FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
setup rs linux fix
tilakpatel224614c6026b74
diff --git a/fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txt b/fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txtindex da947ce1f..7b445b970 100644--- a/fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txt+++ b/fincept-terminal-desktop/src-tauri/resources/requirements-numpy1.txt@@ -1,73 +1,123 @@-# Python Environment 1: NumPy 1.x Compatible Libraries-# For older finance libraries that don't support NumPy 2.x yet+# NumPy 1.x Environment - Legacy Finance Libraries+# For libraries that don't support NumPy 2.x yet# Core dependencies-numpy>=1.26.4,<2.0 # NumPy 1.x for compatibility-pandas>=2.0.0,<2.3.0 # Older pandas versions work better with NumPy 1.x+numpy>=1.26.4,<2.0+pandas>=2.0.0,<2.3.0-# Time series and forecasting (NumPy 1.x dependent)-gluonts[torch]==0.16.2 # Requires numpy<2.2-statsmodels==0.14.6-pmdarima==2.1.1-functime==0.1.10+# Data fetching+aiohappyeyeballs==2.6.1+aiohttp==3.13.2+aiosignal==1.4.0+attrs==25.4.0+beautifulsoup4==4.14.2+certifi==2025.11.12+cffi==2.0.0+charset-normalizer==3.4.4+curl_cffi==0.13.0+databento==0.66.0+databento-dbn==0.44.0+dnspython==2.8.0+feedparser==6.0.12+frozendict==2.4.7+frozenlist==1.8.0+gnews==0.4.2+idna==3.11+multidict==6.7.0+multitasking==0.0.12+pip_system_certs==5.3+platformdirs==4.5.0+propcache==0.4.1+protobuf>=3.20.2,<6.0.0+pyarrow==22.0.0+pycparser==2.23+python-dateutil==2.9.0.post0+pytz==2025.2+requests==2.32.5+sgmllib3k==1.0.0+six==1.17.0+soupsieve==2.8+typing_extensions==4.15.0+tzdata==2025.2+urllib3==2.5.0+websockets==15.0.1+yarl==1.22.0+yfinance==0.2.66+zstandard==0.25.0-# Backtesting and trading+# Backtesting and trading (NumPy 1.x dependent)vectorbt==0.28.2backtesting==0.6.5+# Time series and forecasting+gluonts[torch]==0.16.2+statsmodels==0.14.6+pmdarima==2.1.1+functime==0.1.10+tsmoothie==1.0.5+# Technical analysista==0.11.0talipp==2.7.0-tsmoothie==1.0.5# Financial modelingpy_vollib==1.0.1pypme==0.6.2--# Portfolio optimization (may need NumPy 1.x)-PyPortfolioOpt==1.5.6-finquant-enhanced--# Quantitative financefinancepy==1.0.1ffn==1.1.2fortitudo.tech==1.2--# Fixed incomerateslib==2.1.1-# Data fetching-yfinance==0.2.66-databento==0.66.0-databento-dbn==0.44.0--# Core utilities-beautifulsoup4==4.14.2-feedparser==6.0.12-gnews==0.4.2-requests==2.32.5-aiohttp==3.13.2-websockets==15.0.1-protobuf>=3.20.2,<6.0.0-pyarrow==22.0.0+# Portfolio optimization+PyPortfolioOpt==1.5.6+finquant-enhanced+cvxpy>=1.0.0+cvxopt==1.3.2# Visualization-matplotlib>=3.8.0,<3.10.0 # Compatible with NumPy 1.x+matplotlib>=3.8.0,<3.10.0plotly==6.5.0seaborn>=0.12.0+jinja2==3.1.3+weasyprint==62.3-# ML libraries (NumPy 1.x compatible versions)+# ML libraries (NumPy 1.x compatible)scikit-learn>=1.3.0,<1.6.0scipy>=1.10.0,<1.15.0lightgbm>=4.0.0,<5.0.0xgboost>=2.0.0,<2.2.0catboost>=1.2.0,<1.3.0-# Optimization-cvxpy>=1.0.0-cvxopt==1.3.2--# Qlib and RD-Agent (may need NumPy 1.x)+# Qlib and RD-Agentpyqlib==0.9.7rdagent==0.8.0mlflow>=2.0.0+dill>=0.3.0+fire>=0.4.0+gym>=0.26.0+jupyter>=1.0.0+loguru>=0.6.0+nbconvert>=7.0.0+pydantic-settings>=2.0.0+python-redis-lock>=4.0.0+ruamel.yaml>=0.17.38+nbformat>=5.0.0+pandarallel>=1.6.0+rich>=13.0.0+selenium>=4.0.0+setuptools-scm>=8.0.0+streamlit>=1.47+tiktoken>=0.5.0+typer>=0.9.0+tables>=3.8.0++# LLM/AI+langchain>=0.1.0+langchain-community>=0.0.1+litellm>=1.73++# Database+peewee>=3.17.0,<3.18.0++# Quant finance+gs-quant==1.4.67diff --git a/fincept-terminal-desktop/src-tauri/resources/requirements-numpy2.txt b/fincept-terminal-desktop/src-tauri/resources/requirements-numpy2.txtindex 8b2e2e2c6..ad043bf79 100644--- a/fincept-terminal-desktop/src-tauri/resources/requirements-numpy2.txt+++ b/fincept-terminal-desktop/src-tauri/resources/requirements-numpy2.txt@@ -1,18 +1,22 @@-# Python Environment 2: NumPy 2.x Compatible Libraries-# For modern libraries that require or support NumPy 2.x+# NumPy 2.x Environment - Modern Libraries+# For libraries that require or support NumPy 2.x# Core dependencies-numpy>=2.2.3,<3.0 # NumPy 2.x for modern libraries-pandas>=2.3.3,<3.0 # Latest pandas supports NumPy 2.x+numpy>=2.2.3,<3.0+pandas>=2.3.3,<3.0-# Trading platform-vnpy==4.3.0 # Requires numpy>=2.2.3+# Trading platform (requires NumPy 2.x)+vnpy==4.3.0-# Quant finance-gs-quant==1.4.67+# Data fetching+requests==2.32.5+aiohttp==3.13.2+websockets==15.0.1+beautifulsoup4==4.14.2+protobuf>=3.20.2,<6.0.0-# Data sources-edgartools>=5.6.0 # SEC EDGAR data+# SEC EDGAR data+edgartools>=5.6.0# LLM and AIopenai>=2.8.1,<3.0@@ -24,17 +28,11 @@ litellm>=1.73tiktoken>=0.5.0# ML/DL (NumPy 2.x compatible)-torch>=2.0.0 # Latest PyTorch supports NumPy 2.x--# Core utilities (NumPy 2.x compatible)-requests==2.32.5-aiohttp==3.13.2-websockets==15.0.1-protobuf>=3.20.2,<6.0.0+torch>=2.0.0# Visualizationplotly==6.5.0-matplotlib>=3.9.3,<4.0 # Latest matplotlib supports NumPy 2.x+matplotlib>=3.9.3,<4.0# Development toolsjupyter>=1.0.0@@ -53,7 +51,4 @@ ruamel.yaml>=0.17.38python-redis-lock>=4.0.0setuptools-scm>=8.0.0tables>=3.8.0--# Web scrapingselenium>=4.0.0-beautifulsoup4==4.14.2diff --git a/fincept-terminal-desktop/src-tauri/resources/requirements.txt b/fincept-terminal-desktop/src-tauri/resources/requirements.txtdeleted file mode 100644index 7a970f91f..000000000--- a/fincept-terminal-desktop/src-tauri/resources/requirements.txt+++ /dev/null@@ -1,131 +0,0 @@-aiohappyeyeballs==2.6.1-aiohttp==3.13.2-aiosignal==1.4.0-attrs==25.4.0-beautifulsoup4==4.14.2-certifi==2025.11.12-cffi==2.0.0-charset-normalizer==3.4.4-curl_cffi==0.13.0-databento==0.66.0-databento-dbn==0.44.0-dnspython==2.8.0-feedparser==6.0.12-frozendict==2.4.7-frozenlist==1.8.0-gnews==0.4.2-idna==3.11-multidict==6.7.0-multitasking==0.0.12-numpy>=1.26.4,<3.0 # Support both numpy 1.x and 2.x for compatibility-pandas>=2.3.3,<3.0-vectorbt==0.28.2-backtesting==0.6.5-# fast-trade==1.0.2 # Commented out - not tested with Python 3.12, use backtesting.py instead-peewee>=3.17.0,<3.18.0 # Range for stable binary wheel compatibility-pip_system_certs==5.3-platformdirs==4.5.0-propcache==0.4.1-protobuf>=3.20.2,<6.0.0-pyarrow==22.0.0-pycparser==2.23-python-dateutil==2.9.0.post0-pytz==2025.2-requests==2.32.5-sgmllib3k==1.0.0-six==1.17.0-soupsieve==2.8-ta==0.11.0-typing_extensions==4.15.0-tzdata==2025.2-urllib3==2.5.0-websockets==15.0.1-yarl==1.22.0-yfinance==0.2.66-zstandard==0.25.0-jinja2==3.1.3-weasyprint==62.3-matplotlib>=3.9.3,<4.0-# LLM Provider Packages (for finagent_core)-openai>=2.8.1,<3.0-anthropic>=0.71.0,<1.0-google-generativeai>=0.8.5,<1.0--# AI Quant Lab - Qlib and RD-Agent-pyqlib==0.9.7-rdagent==0.8.0--# Qlib core dependencies-cvxpy>=1.0.0-dill>=0.3.0-fire>=0.4.0-gym>=0.26.0-jupyter>=1.0.0-loguru>=0.6.0-mlflow>=2.0.0-nbconvert>=7.0.0-pydantic-settings>=2.0.0-python-redis-lock>=4.0.0-ruamel.yaml>=0.17.38--# RD-Agent core dependencies-langchain>=0.1.0-langchain-community>=0.0.1-litellm>=1.73-nbformat>=5.0.0-pandarallel>=1.6.0-rich>=13.0.0-seaborn>=0.12.0-selenium>=4.0.0-setuptools-scm>=8.0.0-streamlit>=1.47-tiktoken>=0.5.0-typer>=0.9.0-tables>=3.8.0--# ML/DL libraries for Qlib-lightgbm>=4.0.0-xgboost>=2.0.0-catboost>=1.2.0-torch>=2.0.0-scikit-learn>=1.3.0-scipy>=1.10.0--# EdgarTools - SEC EDGAR data library-edgartools>=5.6.0--# HDX - Humanitarian Data Exchange-# hdx-python-api>=6.3.3 # Removed - using direct CKAN API instead (no dependencies required)--# Optional RD-Agent dependencies (Azure, Kaggle)-# Uncomment if needed:-# azure-ai-formrecognizer-# azure-ai-inference-# azure-identity-# azureml-mlflow-# humanize-# kaggle-# prefect-# pydantic-ai-slim-# python-levenshtein-# randomname-# st-theme-# webdriver-manager-financepy==1.0.1-ffn==1.1.2-plotly==6.5.0-gs-quant==1.4.67-rateslib==2.1.1-fortitudo.tech==1.2-cvxopt==1.3.2-finquant-enhanced-vnpy==4.3.0-talipp==2.7.0-py_vollib==1.0.1-tsmoothie==1.0.5-gluonts[torch]==0.16.2-statsmodels==0.14.6-pypme==0.6.2-pmdarima==2.1.1-functime==0.1.10-PyPortfolioOpt==1.5.6diff --git a/fincept-terminal-desktop/src-tauri/src/setup.rs b/fincept-terminal-desktop/src-tauri/src/setup.rsindex b5cbf9162..b6a7d0f1d 100644--- a/fincept-terminal-desktop/src-tauri/src/setup.rs+++ b/fincept-terminal-desktop/src-tauri/src/setup.rs@@ -139,51 +139,52 @@ fn check_uv(install_dir: &PathBuf) -> bool {uv_exe.exists()}-/// Check if packages are installed (legacy check for backward compatibility)+/// Check if packages are installed (either environment)fn check_packages(install_dir: &PathBuf) -> bool {check_packages_numpy1(install_dir) || check_packages_numpy2(install_dir)}-/// Check if NumPy 1.x environment packages are installed+/// Check NumPy 1.x venvfn check_packages_numpy1(install_dir: &PathBuf) -> bool {- let venv_path = if cfg!(target_os = "windows") {+ let venv_python = if cfg!(target_os = "windows") {install_dir.join("venv-numpy1/Scripts/python.exe")} else {install_dir.join("venv-numpy1/bin/python3")};- if !venv_path.exists() {+ if !venv_python.exists() {return false;}- let mut cmd = Command::new(&venv_path);- cmd.args(&["-c", "import gluonts, yfinance, vectorbt"]);+ let mut cmd = Command::new(&venv_python);+ cmd.args(&["-c", "import gluonts, yfinance, numpy"]);#[cfg(target_os = "windows")]cmd.creation_flags(CREATE_NO_WINDOW);cmd.output().map(|o| o.status.success()).unwrap_or(false)}-/// Check if NumPy 2.x environment packages are installed+/// Check NumPy 2.x venvfn check_packages_numpy2(install_dir: &PathBuf) -> bool {- let venv_path = if cfg!(target_os = "windows") {+ let venv_python = if cfg!(target_os = "windows") {install_dir.join("venv-numpy2/Scripts/python.exe")} else {install_dir.join("venv-numpy2/bin/python3")};- if !venv_path.exists() {+ if !venv_python.exists() {return false;}- let mut cmd = Command::new(&venv_path);- cmd.args(&["-c", "import vnpy, edgartools"]);+ let mut cmd = Command::new(&venv_python);+ cmd.args(&["-c", "import vnpy, edgartools, numpy"]);#[cfg(target_os = "windows")]cmd.creation_flags(CREATE_NO_WINDOW);cmd.output().map(|o| o.status.success()).unwrap_or(false)}+/// Download file with progressasync fn download_file(url: &str, dest: &PathBuf, app: &AppHandle, step: &str) -> Result<(), String> {use reqwest;@@ -766,9 +767,9 @@ async fn install_uv(app: &AppHandle, install_dir: &PathBuf) -> Result<(), StringOk(())}-/// Install NumPy 1.x environment packages using UV (SUPER FAST)+/// Install NumPy 1.x venv packagesasync fn install_packages_numpy1(app: &AppHandle, install_dir: &PathBuf) -> Result<(), String> {- emit_progress(app, "packages-np1", 0, "Installing NumPy 1.x packages (UV)...", false);+ emit_progress(app, "packages-np1", 0, "Installing NumPy 1.x packages...", false);let python_exe = if cfg!(target_os = "windows") {install_dir.join("python/python.exe")@@ -787,10 +788,10 @@ async fn install_packages_numpy1(app: &AppHandle, install_dir: &PathBuf) -> Resu.resolve("resources/requirements-numpy1.txt", tauri::path::BaseDirectory::Resource).map_err(|e| format!("Failed to find requirements-numpy1.txt: {}", e))?;- eprintln!("[SETUP] [NumPy1] Creating virtual environment at: {}", venv_path.display());- emit_progress(app, "packages-np1", 10, "Creating venv-numpy1...", false);+ eprintln!("[SETUP] [NumPy1] Creating venv at: {}", venv_path.display());+ emit_progress(app, "packages-np1", 10, "Creating venv...", false);- // Create venv using UV (fastest way)+ // Create venvlet mut cmd = Command::new(&uv_exe);cmd.args(&["venv", "--python", python_exe.to_str().unwrap(), venv_path.to_str().unwrap()]);#[cfg(target_os = "windows")]@@ -798,14 +799,12 @@ async fn install_packages_numpy1(app: &AppHandle, install_dir: &PathBuf) -> Resulet output = cmd.output().map_err(|e| format!("Failed to create venv: {}", e))?;if !output.status.success() {- let stderr = String::from_utf8_lossy(&output.stderr);- return Err(format!("venv creation failed: {}", stderr));+ return Err(format!("venv creation failed: {}", String::from_utf8_lossy(&output.stderr)));}- eprintln!("[SETUP] [NumPy1] Installing packages with UV...");- emit_progress(app, "packages-np1", 30, "Installing NumPy 1.x packages...", false);+ emit_progress(app, "packages-np1", 30, "Installing packages...", false);- // Install packages using UV pip (super fast!)+ // Install packageslet venv_python = if cfg!(target_os = "windows") {venv_path.join("Scripts/python.exe")} else {@@ -817,31 +816,23 @@ async fn install_packages_numpy1(app: &AppHandle, install_dir: &PathBuf) -> Resu#[cfg(target_os = "windows")]cmd.creation_flags(CREATE_NO_WINDOW);+ eprintln!("[SETUP] [NumPy1] Running: {:?}", cmd);let output = cmd.output().map_err(|e| format!("Failed to install packages: {}", e))?;- let stdout = String::from_utf8_lossy(&output.stdout);- let stderr = String::from_utf8_lossy(&output.stderr);- eprintln!("[SETUP] [NumPy1] UV stdout: {}", stdout);- eprintln!("[SETUP] [NumPy1] UV stderr: {}", stderr);+ eprintln!("[SETUP] [NumPy1] stdout: {}", String::from_utf8_lossy(&output.stdout));+ eprintln!("[SETUP] [NumPy1] stderr: {}", String::from_utf8_lossy(&output.stderr));if !output.status.success() {- return Err(format!("NumPy 1.x package installation failed: {}", stderr));- }-- emit_progress(app, "packages-np1", 90, "NumPy 1.x packages installed", false);-- // Verify- if !check_packages_numpy1(install_dir) {- return Err("NumPy 1.x package verification failed".to_string());+ return Err(format!("NumPy 1.x installation failed: {}", String::from_utf8_lossy(&output.stderr)));}- emit_progress(app, "packages-np1", 100, "NumPy 1.x complete ✓", false);+ emit_progress(app, "packages-np1", 100, "NumPy 1.x complete", false);Ok(())}-/// Install NumPy 2.x environment packages using UV (SUPER FAST)+/// Install NumPy 2.x venv packagesasync fn install_packages_numpy2(app: &AppHandle, install_dir: &PathBuf) -> Result<(), String> {- emit_progress(app, "packages-np2", 0, "Installing NumPy 2.x packages (UV)...", false);+ emit_progress(app, "packages-np2", 0, "Installing NumPy 2.x packages...", false);let python_exe = if cfg!(target_os = "windows") {install_dir.join("python/python.exe")@@ -860,10 +851,10 @@ async fn install_packages_numpy2(app: &AppHandle, install_dir: &PathBuf) -> Resu.resolve("resources/requirements-numpy2.txt", tauri::path::BaseDirectory::Resource).map_err(|e| format!("Failed to find requirements-numpy2.txt: {}", e))?;- eprintln!("[SETUP] [NumPy2] Creating virtual environment at: {}", venv_path.display());- emit_progress(app, "packages-np2", 10, "Creating venv-numpy2...", false);+ eprintln!("[SETUP] [NumPy2] Creating venv at: {}", venv_path.display());+ emit_progress(app, "packages-np2", 10, "Creating venv...", false);- // Create venv using UV (fastest way)+ // Create venvlet mut cmd = Command::new(&uv_exe);cmd.args(&["venv", "--python", python_exe.to_str().unwrap(), venv_path.to_str().unwrap()]);#[cfg(target_os = "windows")]@@ -871,14 +862,12 @@ async fn install_packages_numpy2(app: &AppHandle, install_dir: &PathBuf) -> Resulet output = cmd.output().map_err(|e| format!("Failed to create venv: {}", e))?;if !output.status.success() {- let stderr = String::from_utf8_lossy(&output.stderr);- return Err(format!("venv creation failed: {}", stderr));+ return Err(format!("venv creation failed: {}", String::from_utf8_lossy(&output.stderr)));}- eprintln!("[SETUP] [NumPy2] Installing packages with UV...");- emit_progress(app, "packages-np2", 30, "Installing NumPy 2.x packages...", false);+ emit_progress(app, "packages-np2", 30, "Installing packages...", false);- // Install packages using UV pip (super fast!)+ // Install packageslet venv_python = if cfg!(target_os = "windows") {venv_path.join("Scripts/python.exe")} else {@@ -890,32 +879,17 @@ async fn install_packages_numpy2(app: &AppHandle, install_dir: &PathBuf) -> Resu#[cfg(target_os = "windows")]cmd.creation_flags(CREATE_NO_WINDOW);+ eprintln!("[SETUP] [NumPy2] Running: {:?}", cmd);let output = cmd.output().map_err(|e| format!("Failed to install packages: {}", e))?;- let stdout = String::from_utf8_lossy(&output.stdout);- let stderr = String::from_utf8_lossy(&output.stderr);- eprintln!("[SETUP] [NumPy2] UV stdout: {}", stdout);- eprintln!("[SETUP] [NumPy2] UV stderr: {}", stderr);+ eprintln!("[SETUP] [NumPy2] stdout: {}", String::from_utf8_lossy(&output.stdout));+ eprintln!("[SETUP] [NumPy2] stderr: {}", String::from_utf8_lossy(&output.stderr));if !output.status.success() {- return Err(format!("NumPy 2.x package installation failed: {}", stderr));+ return Err(format!("NumPy 2.x installation failed: {}", String::from_utf8_lossy(&output.stderr)));}- emit_progress(app, "packages-np2", 90, "NumPy 2.x packages installed", false);-- // Verify- if !check_packages_numpy2(install_dir) {- return Err("NumPy 2.x package verification failed".to_string());- }-- emit_progress(app, "packages-np2", 100, "NumPy 2.x complete ✓", false);- Ok(())-}--/// Install both package environments (legacy wrapper)-async fn install_packages(app: &AppHandle, install_dir: &PathBuf) -> Result<(), String> {- install_packages_numpy1(app, install_dir).await?;- install_packages_numpy2(app, install_dir).await?;+ emit_progress(app, "packages-np2", 100, "NumPy 2.x complete", false);Ok(())}@@ -929,7 +903,7 @@ pub fn check_setup_status(app: AppHandle) -> Result<SetupStatus, String> {let uv_installed = check_uv(&install_dir);let packages_numpy1_installed = check_packages_numpy1(&install_dir);let packages_numpy2_installed = check_packages_numpy2(&install_dir);- let packages_installed = packages_numpy1_installed || packages_numpy2_installed;+ let packages_installed = packages_numpy1_installed && packages_numpy2_installed;let needs_setup = !python_installed || !bun_installed || !uv_installed || !packages_numpy1_installed || !packages_numpy2_installed;@@ -1011,6 +985,6 @@ async fn run_setup_internal(app: AppHandle) -> Result<(), String> {emit_progress(&app, "packages-np2", 100, "NumPy 2.x already installed", false);}- emit_progress(&app, "complete", 100, "Setup complete! Both environments ready ✓", false);+ emit_progress(&app, "complete", 100, "Setup complete! Both environments ready", false);Ok(())}