- PIP Install (Recommended)
- Manual Install
- Conda Install
- Install Graphviz (Optional)
- Test NeuroMANCER Installation
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+.
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
conda create -n neuromancer python=3.10.4
conda activate neuromancer
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"]
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 is recommended for GPU acceleration.
❗️Warning:
linux_env.yml
,windows_env.yml
, andosxarm64_env.yml
are out of date. Manual installation of dependencies is recommended for conda.
conda env create -f linux_env.yml
conda activate neuromancer
conda env create -f windows_env.yml
conda activate neuromancer
conda install -c defaults intel-openmp -f
conda env create -f osxarm64_env.yml
conda activate neuromancer
!!! 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
From the top level directory of cloned neuromancer (in the activated environment where the dependencies have been installed):
pip install -e . --no-deps
In order to use the Problem graph plots, we recommend installing Graphviz system-wide. Note that this feature is optional.
Package must be installed manually: Graphviz website
sudo apt install graphviz
brew install graphviz
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.