Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sometimes it is useful to install python packages that are not part of psana-python or install particular versions of a software package.  We have two recommended ways of doing this.  Both of these should be done from the "pslogin" machines since they have internet access and the currently supported version of the operating system (RHEL7).

Virtualenv

.

Anaconda

psana now lives in the anaconda environment.  You can clone the psana environment to a local environment that you can control with a command like this (which will take some time because it has to copy several GB to the new environment):

Code Block
conda create -n my-ana-1.3.10 --clone ana-1.3.10

You can see a list of available psana environments (to clone) like this:

Code Block
conda info --envs

Then activate the new environment with:

Code Block
source activate my-ana-1.3.10

Then install the conda-python package you want (potentially a specific version) using a command like:

Code Block
conda install scipy=0.15.0

 

Virtualenv

NOTE: the virtualenv method is not compatible with our anaconda-based psana, but we leave the documentation here in case it is useful at some point.

A python virtualenv can be used to install python packages locally in your user account.  Some instructions are here.  It is available as a tool within psana, and is compatible with psana-python.  Execute this command to create a new virtual environment (after setting up the psana psana environment):

...

Use "deactivate" to exit the virtualenv.  Install various packages using "pip install <packageName>" as shown in these instructions.  Virtualenv packages can be used in batch jobs, but you must submit the job while the environment is active.

Anaconda

Unlike virtualenv, anaconda is not currently compatible with psana-python (we are actively working on this).  But it is a powerful way to install python packages outside of the psana environment.  Instructions are here.