User Tools

Site Tools


python

Python Installation

Python can be pain to maintain on your own, especially if you require up-to-date packages. To get around this, there are a number of Python distributions that bundle packages. These work independent of the installation provided on your operating systems. The largest two are Enthought Canopy and Anaconda. With a (free) academic license, you can install either in your own ICS home directory or your laptops.

Volker's Anaconda Installation

:!:

If you don't want to use the Enthough installation discussed below, you can also hijack Volker's personal Anaconda installation. To do so, simply append

export PATH=/home/ics/volker/Anaconda/bin:$PATH

to your the .bashrc file in home directory.

Global Enthought Installation

For convenience, we provide a site-wide installation of Enthought Canopy on the zBox. It comes with the most wanted packages (IPython/Numpy/Scipy/Matplotlib/Scikit). You can use it as follows.

1) Create/edit the .bashrc file in your home and add

VIRTUAL_ENV_DISABLE_PROMPT=1 source /zbox/opt/Enthought/Canopy_64bit/User/bin/activate

2) If you are compiling stuff, you will also need to add

export LIBRARY_PATH=/zbox/opt/Enthought/Canopy_64bit/User/lib:$LIBRARY_PATH

3) Create/edit the .bash_profile file in your home and add

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

4) Log out, log in again. Then type (in the shell) “which ipython”. It should return

/zbox/opt/Enthought/Canopy_64bit/User/bin/ipython

Also note:

  • Pynbody is installed for the SPH-junkies among you.
  • Pymses (with amrviewer) is also compiled. To use these, you need to add more lines to your .bashrc
PYTHONPATH=$PYTHONPATH:/zbox/opt/pymses_4.0.0
export PYTHONPATH

PATH=$PATH:/zbox/opt/pymses_4.0.0/bin
export PATH
  • If you find this line somewhere in your .bashrc, .bash_profile, or .profile in your home directory, you should comment it out.
# If not running interactively, don't do anything
[ -z "$PS1" ] && return

If you have trouble and/or need more packages, feel free to mail Volker.

If you use another shell (zsh, tcsh, …), you can likely figure out the appropriate steps yourself.

python.txt · Last modified: 2015/10/05 09:45 by volker