You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Sometimes it is useful to install python packages that are not part of psana-python.  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

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):

virtualenv <directoryName>

where you replace <directoryName> with the name of the directory you would like to create.  Then activate your virtualenv like this:

source <directoryName>/bin/activate.csh     #use this for tcsh
 
or
 
source <directoryName>/bin/activate.sh      #use this for bash

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.

  • No labels