Installation¶
Prerequisites¶
- C++ compiler with C++20 support (GCC 10+, Clang 10+, MSVC 2019+)
- Python 3.7+ with development headers
- pybind11 (automatically installed during build)
Installation Methods¶
Via pip (Recommended)¶
From Source¶
1. Clone the repository¶
2. Create virtual environment (recommended)¶
3. Build and install¶
Or manually:
Optional Dependencies¶
Install extra dependencies for examples and plotting:
pip install neun-py[examples] # Includes matplotlib
pip install neun-py[full] # All optional dependencies
Or if building from source:
Platform-Specific Notes¶
Linux¶
Install development headers:
# Debian/Ubuntu
sudo apt install python3-dev g++
# Fedora/RHEL
sudo dnf install python3-devel gcc-c++
macOS¶
Install Xcode Command Line Tools:
Windows¶
Install Visual Studio 2019 or later with C++ support, or use MinGW-w64.
Verifying Installation¶
Test the installation:
Run example:
Troubleshooting¶
Import Error¶
If you get ImportError: No module named 'neun_py':
- Ensure the virtual environment is activated
- Verify installation:
pip list | grep neun
Compilation Error¶
If C++ compilation fails:
- Check compiler version:
g++ --version(should be 10+) - Ensure C++20 support is available
- Check Python dev headers:
python3-config --includes
Missing Headers¶
If the build can't find Neun headers:
Next Steps¶
- Quick Start Guide - Your first simulation
- Building from Source - Advanced build options