forked from amusecode/amuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation on macOS with Python3
Steven Rieder edited this page Nov 29, 2023
·
16 revisions
First, install the prerequisites.
On macOS:
I use macports for this, but other methods may work just as well.
sudo port install gcc12 openmpi-gcc12 hdf5 gsl cmake gmp mpfr fftw-3 +gcc12
sudo port install python311 py311-virtualenv Next, set the just installed compilers to be the default.
sudo port select --set mpi openmpi-gcc12-fortran
sudo port select --set gcc mp-gcc12
sudo port select --set python3 python311Then, make a virtual environment for Amuse.
python3 -m venv Amuse-envThis virtual environment ensures you are using the correct modules, and isolates them from other system-installed packages.
To activate the environment, use
. Amuse-env/bin/activateFrom this point, your prompt will have 'Amuse-env ' in front of it, to indicate that you are using this virtual environment.
Install the python modules required by Amuse:
pip install numpy scipy matplotlib nose docutils mpi4py h5py wheelAlso, install any additional modules you might want to use, like Astropy:
pip install astropy jupyterModules needed for some of the textbook examples:
pip install pandas seabornNow, go to your Amuse repository
cd $AMUSEDIRNow run configure
./configure [--enable-cuda] [--enable-sapporo2]Finally, install Amuse
python setup.py installDone!