How to install?¶
MulensModel can be installed using setup.py - just download the source, go to the package directory and run:
python setup.py install
To make sure that all the necessary packages (including astropy package) are installed, please run:
pip install -r requirements.txt
and this should work. If there are problems, please contact code authors.
Old installation¶
Make sure you have python with astropy package installed.
Download source code - either recent release or the current repository from MulensModel github page (green button on right).
Unpack the archive.
Add the path to the unpack directory to the
PYTHONPATH
, e.g., if you’ve extracted the archive in your home directory (/home/USER_NAME/
) and MulensModel version in 1.17.0 in tcsh (update the path as needed):setenv PYTHONPATH /home/USER_NAME/MulensModel-1.17.0/source\:$PYTHONPATH
in bash:
export PYTHONPATH=/home/USER_NAME/MulensModel-1.17.0/source:$PYTHONPATH
In order to have this command invoked every time you open a terminal, please add this command to your startup file (~/.cshrc
, ~/.bashrc
, ~/.profile
, or similar). If you didn’t have PYTHONPATH
defined before, then skip the last part of the above commands.
Go to subdirectory
source/VBBL/
and runmake
command. If it’s not working and you’re using Windows, then please run:gcc -lm -lstdc++ -fPIC -c VBBinaryLensingLibrary.cpp gcc -Wl,-soname,rapper -shared -o VBBinaryLensingLibrary_wrapper.so VBBinaryLensingLibrary_wrapper.cpp -lm -lstdc++ -fPIC VBBinaryLensingLibrary.o
Repeat step 5. in
source/AdaptiveContouring/
subdirectory.Run
py.test
insource/MulensModel/
to check that all unit tests pass.Congratulations! You have MulensModel installed fully.