

- #Install ipython notebook in python venv how to
- #Install ipython notebook in python venv install
- #Install ipython notebook in python venv code
#Install ipython notebook in python venv install
If you install REBOUND directly from github, you can also run it without python. You can modify the python module files in the directory rebound/ and you'll see the changed the next time you run a python script (no need to reinstall the REBOUND package every time). Now you can install rebound from source using pip install -e. Next, create a virtual environment with the same commands as above: virtualenv venv & source venv/bin/activate This is useful if you want to make changes to REBOUND.įirst clone the repository (you might need to create a github account): git clone you already know that you might be contributing something to REBOUND, you can also first fork the repository on github and then clone your own repository. Instead of using pip to install the latest version of REBOUND from PyPI, you can also install REBOUND directly from github. That's all there is to do! Installing the development version directly from github Depending on whether you use virtualenv or conda, use pip install numpy matplotlib scipy Installing those libraries is also very easy (but may need a few minutes). For analysis tools (and to run FourierSpectrum.ipynb) you might also want scipy. No other libraries are needed to start working with WHFast and REBOUND, but you might want to install numpy and matplotlib to be able to post-process your data and make plots.

#Install ipython notebook in python venv code
The setup script will download the latest version of REBOUND from PyPI (the Python Package Index), compile the C code in the background and place all the files in their correct location. All you have to do is type the following into a terminal window (if you created a virtual environment above you should first run the appropriate activate command depending on whether you used virtualenv or conda): pip install rebound To create a conda environment run the following command: conda create -n venv pip If you use the Anaconda distribution, the above likely will not work.

If you log out of your terminal or open a new one, you'll need to reactivate the virtual environment with the above command (if the environment is active you'll see its name in parentheses before the command prompt). To activate it, type: source venv/bin/activate This creates a virtual environment named venv. home/username/rebound/) and enter: virtualenv venv To create a virtual environment, simply open a terminal window, go to the folder where you want REBOUND to be installed (e.g. You need to have virtualenv installed (if you use the Anaconda python distribution, you'll need to instead create a conda environment - see below). Create a virtual environmentīefore you start, you can create a virtual environment to keep your python installation clean. For the C compiler on Mac, it's probably easiest to install Xcode from the App store.
#Install ipython notebook in python venv how to
If you don't, and aren't sure how to go about getting them, it is probably easiest to install either the Enthought or Anaconda python distributions (which are free and come with typically used libraries and an easy-to-use installer). Most likely, you already have those on your system.

However, you need to have python (version 2 or 3) and a C compiler installed. Rebound does not depend on any libraries.
