NbodyKit has tons of modules and functionalities available here. See the The Cookbook and the API Reference for a quick start.
NbodyKit is compatible with Python versions 2.7, 3.5, and 3.6, and the source code is publicly available on https://github.com/bccp/nbodykit. NbodyKit has pre-built binaries and all of its dependencies available via Anaconda distribution that are compatible with Linux and macOS platforms. To avoid dependency conflicts, it is recommended to install nbodykit into a fresh virtual environment, achieved with the following commands:
- $ conda create --name nbodykit-env python=3 # or use python=2 for python 2.7*
- $ source activate nbodykit-env
- $ conda install -c bccp nbodykit
If you need Jupyter Notebook, you can install it using Python’s package manager, pip or Anaconda.
If using pip, first, ensure that you have the latest pip (older versions may have trouble with some dependencies):
pip3 install --upgrade pip
Then install the Jupyter Notebook using:
pip3 install jupyter
Use pip instead of pip3 if using Python 2.x.
You can then launch Jupyter Notebook as:
$jupyter notebook
If you get an error AttributeError: type object 'IOLoop' has no attribute 'initialized', just do the following:
- $pip uninstall tornado //Successfully uninstalled tornado-5.1
- $pip install tornado==4.5.3
See reasons here.
After launching the notebook, follow instructions displayed in the Terminal:
"Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=c5a1a49859 ... 023a07b14a"
See also Interactive Parallel Computing with IPython -ipyparallel