Installation Instructions
June 10, 2025 · View on GitHub
Installation Instructions
Table of Contents
- PIP Install (Recommended)
- Manual Install
- Conda Install
- Install Graphviz (Optional)
- Test NeuroMANCER Installation
PIP Install (Recommended)
Using pip is the simplest way to install NeuroMANCER. It's recommended to use a dedicated virtual environment (e.g., conda, venv) with Python 3.9+.
Since PyTorch doesn't officially publish CUDA wheels to PyPI (due to size), to use CUDA, you need to manually reinstall pytorch in your local environment via:
pip uninstall torch -y
pip install torch --index-url https://download.pytorch.org/whl/cu121
Manual Install
Clone the Repository
First clone the neuromancer package. A dedicated virtual environment (conda or otherwise) is recommended.
Note: If you have a previous neuromancer env it would be best at this point to create a new environment given the following instructions.
git clone -b master https://github.com/pnnl/neuromancer.git --single-branch
Create and Activate Virtual Environment
conda create -n neuromancer python=3.10.4
conda activate neuromancer
Install Neuromancer and All Dependencies.
From top level directory of cloned neuromancer run:
pip install -e.[docs,tests,examples]
OR, for zsh users:
pip install -e.'[docs,tests,examples]'
See the pyproject.toml file for reference.
[project.optional-dependencies]
tests = ["pytest", "hypothesis"]
examples = ["casadi", "cvxpy", "imageio", "cvxpylayers"]
docs = ["sphinx", "sphinx-rtd-theme"]
Notes for MacOS (Apple M1)
Before CVXPY can be installed on Apple M1, you must install cmake via Homebrew:
brew install cmake
See CVXPY installation instructions for more details.
Conda install
Conda install is recommended for GPU acceleration.
❗️Warning:
linux_env.yml,windows_env.yml, andosxarm64_env.ymlare out of date. Manual installation of dependencies is recommended for conda.
Create Environment and Install Dependencies
Ubuntu
conda env create -f linux_env.yml
conda activate neuromancer
Windows
conda env create -f windows_env.yml
conda activate neuromancer
conda install -c defaults intel-openmp -f
MacOS (Apple Silicon)
conda env create -f osxarm64_env.yml
conda activate neuromancer
Other (manually install all dependencies)
!!! Pay attention to comments for non-Linux OS !!!
conda create -n neuromancer python=3.10.4
conda activate neuromancer
conda install pytorch pytorch-cuda=11.6 -c pytorch -c nvidia
## OR (for Mac): conda install pytorch -c pytorch
conda config --append channels conda-forge
conda install scipy numpy"<1.24.0" matplotlib scikit-learn pandas dill mlflow pydot=1.4.2 pyts numba
conda install networkx=3.0 plum-dispatch=1.7.3
conda install -c anaconda pytest hypothesis
conda install cvxpy cvxopt casadi seaborn imageio
conda install tqdm torchdiffeq toml
conda install lightning wandb -c conda-forge
## (for Windows): conda install -c defaults intel-openmp -f
Install NeuroMANCER package
From the top level directory of cloned neuromancer (in the activated environment where the dependencies have been installed):
pip install -e . --no-deps
Install Graphviz (optional)
In order to use the Problem graph plots, we recommend installing Graphviz system-wide. Note that this feature is optional.
For Windows:
Package must be installed manually: Graphviz website
For Linux (Debian, Ubuntu)
sudo apt install graphviz
For MacOS
brew install graphviz
Test NeuroMANCER install
Run pytest on the tests folder. It should take about 2 minutes to run the tests on CPU. There will be a lot of warnings that you can safely ignore. These warnings will be cleaned up in a future release.