- Python: 3.9 or higher
- Operating System: Linux, macOS, or Windows
- Memory: Minimum 2GB RAM (8GB recommended for large-scale simulations)
- Disk Space: ~500MB for installation and dependencies
For users who want to run the framework:
# Clone the repository
git clone https://github.com/yourusername/fourth-stomach.git
cd fourth-stomach
# Create virtual environment (recommended)
python -m venv venv
# Activate virtual environment
# On Linux/macOS:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Install the package
pip install -e .For contributors and developers:
# Clone the repository
git clone https://github.com/yourusername/fourth-stomach.git
cd fourth-stomach
# Create virtual environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install with development dependencies
pip install -e ".[dev]"If you have make installed:
# Clone repository
git clone https://github.com/yourusername/fourth-stomach.git
cd fourth-stomach
# Install core package
make install
# Or install with development tools
make install-devVerify the installation:
# Check Python version
python --version # Should be 3.9 or higher
# Run tests
pytest tests/ -v
# Or using Make
make testTest the installation by running demonstration scripts:
# Circulation Transaction Network
python src/ctn/demo_circulation.py
# Shadow Network Analysis
python src/ctn/demo_shadow_network.py
# Multi-Modal Representations
python src/representation/demo_representations.py
# Or using Make
make demo-ctn
make demo-shadow
make demo-repThe dependencies weren't installed correctly. Try:
pip install -r requirements.txtThe package wasn't installed in editable mode. Ensure you're in the project root and run:
pip install -e .Ensure you have the development dependencies:
pip install pytest pytest-cov
pytest tests/ -vOn Windows, you may need to:
- Install Visual C++ Build Tools if scipy installation fails
- Use
python -m pipinstead ofpipdirectly - Run PowerShell or Command Prompt as Administrator
Check your Python version:
python --versionIf you have multiple Python versions, you may need to specify:
python3.9 -m venv venv
# or
python3.10 -m venv venvpip install sqlalchemy redispip install fastapi uvicorn websocketspip install sphinx sphinx-rtd-themepip install cryptography pynaclA Dockerfile will be provided in future releases for containerized deployment.
To update to the latest version:
cd fourth-stomach
git pull origin main
pip install -e . --upgradeTo remove the package:
pip uninstall fourth-stomachTo completely remove the environment:
deactivate # Exit virtual environment
rm -rf venv/ # Remove virtual environment directoryAfter installation:
- Read the documentation: Start with
README.md - Run demos: Try
demo_circulation.pyand other demos - Read theory: Review papers in
docs/publication/ - Run tests: Verify everything works with
pytest - Explore code: Check
src/ctn/andsrc/representation/
For installation issues:
- Check existing issues: https://github.com/yourusername/fourth-stomach/issues
- Open a new issue with:
- Your Python version (
python --version) - Your OS and version
- Full error message
- Steps to reproduce
- Your Python version (
For developers contributing to the project:
# Clone and install in dev mode
git clone https://github.com/yourusername/fourth-stomach.git
cd fourth-stomach
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
# Set up pre-commit hooks (optional)
pip install pre-commit
pre-commit install
# Format code
make format
# Run linters
make lint
# Run tests with coverage
make test-covAll features fully supported. Install system dependencies if needed:
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install python3-dev
# Fedora/RHEL
sudo dnf install python3-develFully supported. You may need to install Xcode Command Line Tools:
xcode-select --installSupported with minor limitations:
- Make commands unavailable (use Python commands directly)
- Some path separators differ (handled automatically by pathlib)
- Recommended: Use Windows Terminal or PowerShell
For better performance on large datasets:
# Install optimized BLAS/LAPACK
pip install numpy scipy --upgrade --force-reinstall
# Consider installing Intel MKL (if using Intel CPU)
pip install mklIf using this software in academic work, see the citation format in README.md.