Installing a Python distro for testing and development
Installing Python for testing and development on beach
There are several Python distributions available on beach, but it's often useful to install a separate, local, Python distribution for testing and development. This is a technique used frequently by the CSDMS software engineers; see, e.g., the article Installing a WMT executor. If things go horribly awry, you can just delete the distribution and start over again.
Start by creating an install directory for the Python distribution in your home directory. I'll call mine testing.
cd mkdir testing
Change to the install directory you've selected and define a shell variable, root
, for future use.
cd testing root=$(pwd)
Next, download a Python distribution.
The CSDMS software engineers recommend miniconda,
a minimal distribution based on the Anaconda Python distribution.
We can grab the miniconda installer with curl
:
curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o miniconda.sh
Foo.
bash ./miniconda.sh -f -b -p $root/conda export PATH=$root/conda/bin:$PATH
Use the Anaconda package manager, conda
,
to install a set of packages used by the executor.
conda install ipython numpy scipy netcdf4