Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:AI4Finance Foundation FinGPT Python

From Leeroopedia
Knowledge Sources
Domains Infrastructure
Last Updated 2026-10-18 00:00 GMT

Overview

Base Python 3.8+ runtime environment with core data handling, packaging, and utility dependencies for all FinGPT subprojects.

Description

This environment defines the foundational Python runtime and core data-handling packages shared across all FinGPT subprojects. It includes `numpy<2` (pinned due to PyTorch compatibility), `pandas`, `setuptools>=41.4.0`, and `wheel>=0.33.6`. The root `setup.py` and `requirements.txt` define the base package configuration. All other environments (PyTorch_CUDA, HuggingFace, etc.) build on top of this.

Usage

Use this environment as the base for all FinGPT workflows. It is the minimum prerequisite for any script in the repository.

System Requirements

Category Requirement Notes
OS Linux / Mac / Windows Cross-platform
Python >= 3.8 3.10+ recommended
Disk 5GB For base packages and caches

Dependencies

Python Packages

  • `numpy` < 2 (pinned for PyTorch/ML compatibility)
  • `pandas` >= 1.5.0
  • `setuptools` >= 41.4.0
  • `wheel` >= 0.33.6
  • `tushare` (for Chinese market data)
  • `python-dateutil` >= 2.8.0

Credentials

No credentials required for the base environment.

Quick Install

pip install "numpy<2" "pandas>=1.5.0" "setuptools>=41.4.0" "wheel>=0.33.6" tushare "python-dateutil>=2.8.0"

Code Evidence

Root requirements from `requirements.txt`:

numpy<2  # NumPy 2.x compatibility issues with PyTorch and other ML dependencies
pandas
setuptools>=41.4.0
wheel>=0.33.6

Setup configuration from `setup.py`:

setup(
    name="fingpt",
    ...
    install_requires=[
        "numpy<2", "pandas", "transformers>=4.32.0", "peft>=0.5.0",
        "sentencepiece", "accelerate", "torch", "datasets", "bitsandbytes>=0.43.1",
    ],
)

Common Errors

Error Message Cause Solution
`NumPy 2.x compatibility issue` numpy>=2 installed Pin `numpy<2` in requirements
`ModuleNotFoundError: tushare` tushare not installed `pip install tushare`
`setuptools too old` Outdated setuptools `pip install --upgrade setuptools>=41.4.0`

Compatibility Notes

  • NumPy pin: `numpy<2` is critical; NumPy 2.x breaks PyTorch and other ML dependencies.
  • Python 3.8+: Minimum version; 3.10+ recommended for latest transformers features.
  • tushare: Required only for Chinese A-share market data (`FinGPT-Forecaster-Chinese`).

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment