Installation¶
You need Python 3.10 or newer. Check with:
python --version
1. Create a virtual environment (recommended)¶
A virtual environment keeps this package and its dependencies separate from the rest of your system.
On macOS / Linux:
python -m venv rhapsody-env
source rhapsody-env/bin/activate
On Windows:
python -m venv rhapsody-env
rhapsody-env\Scripts\activate
2. Install the package¶
Directly from GitHub:
pip install git+https://github.com/jam-sadiq/celestial-rhapsody.git
Or from a downloaded copy of the source:
cd celestial-rhapsody
pip install .
pip also installs the dependencies (NumPy, Matplotlib and Pillow).
3. Check that it works¶
nbody --version
should print celestial-rhapsody 0.1.0. If your shell says
command not found, make sure the virtual environment is activated. You can
also always run python -m celestial_rhapsody instead of nbody.
Optional: MP4 output¶
GIF output works out of the box. For .mp4 files you also need
ffmpeg:
macOS:
brew install ffmpegUbuntu / Debian:
sudo apt install ffmpegconda (any OS):
conda install -c conda-forge ffmpeg