Skip to content

Create conda packages for LAL software

Notifications You must be signed in to change notification settings

moble/conda-lal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE:

I am no longer developing this project because there were (when I was working on it, at least) some necessary code versions that were private to LVC members. Jonah Miller has now taken it over, however, and reports success.

There is also a docker image that's supposedly publicly available, and looks like it's maintained reasonably well.

The rest of this repo (including this README) is just what I had gotten working before I gave up.


Installing LAL's python packages

The usual instructions for pycbc are here. They are long, and nested. This is (hopefully) an easier option.

TL-DR

Install anaconda and run this:

conda install -c moble pycbc

Full instructions

Install Anaconda

Install anaconda here.

Your system python is old and crusty, but it needs to be that way or your printer might break. Your package manager needs its own version of python to support that weird OCR package you want, or whatever it is this week. But you---when running straight python on its own---you want a separate up-to-date version of python to run fancy new code with. And most of all you want to minimize the headaches that usually go along with managing python.

The answer is anaconda, which is a python manager developed by the guy behind numpy (and a lot of scipy). He decided that it was just too much hassle maintaining those big, complex packages with existing python tools like pip and setuptools, so he created anaconda. Scientific python developers have now almost uniformly adopted this as the way to use python, because there's no better way to manage python packages.

Anaconda installs in your user directory, so you can use it on clusters just as easily as on your laptop, and it doesn't get mixed up with your OS or package-manager versions of python. Outside of its own directory, the only change it (optionally!) makes is to prepend its bin directory to your PATH in your ~/.bashrc file.

Note that you should not use PYTHONPATH or similar environment variables. Python can still get confused by that occasionally, even with anaconda, so make sure it is not set.

Create a conda environment just for this

Since pycbc apparently doesn't work with newer versions of python, you need to do this step if you installed the python 3.5 version of anaconda. This step is optional if you installed the python 2.7 version, but it might still be nice to contain LAL's dependencies in one environment. An analogous thing is also recommended (using the outdated virtualenv) in the pycbc installation instructions. To create and activate the environment, do this:

conda create -y --name lal python=2.7
source activate lal
conda update -y --all
pip install --upgrade pip

Now, your current shell will always use python-y things from this environment only. Other shells will not be affected. And you can get out of this environment in the current shell just by running source deactivate at any time.

Be sure to run source activate lal in any new shell before you try using or installing in this environment.

Populate the environment with basic packages

Whether or not you created the lal environment above, you should run this command:

conda install -y numpy h5py cython
pip install python-cjson
conda install -y -c moble fftw gsl libframe libmetaio glue lscsoft-user-env lalsuite

unittest2

To build any of these packages yourself, you should first do

conda install -y anaconda-build

conda build --python 2.7 .

About

Create conda packages for LAL software

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages