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

Compare with Current View Page History

« Previous Version 5 Next »

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