User Tools

Site Tools


python:virtualenv

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

python:virtualenv [2011/01/05 14:48] (current)
tkbletsc created
Line 1: Line 1:
 +The script below is a recipe to download and deploy Python 2.7 in your home directory without dependencies (except gcc).  It also uses virtualenv to deploy a virtual Python environment,​ then uses the included setuptools ''​pip''​ utility to install the ''​numpy''​ module.
  
 +<code bash>
 +PYVER=2.7.1
 +PYPATH=~/​python2.7
 +VPYPATH=~/​vpython2.7
 +
 +mkdir -p $PYPATH ​ &&
 +wget -c http://​www.python.org/​ftp/​python/​$PYVER/​Python-$PYVER.tgz ​ &&
 +echo Extracting...
 +
 +tar xf Python-$PYVER.tgz ​ &&
 +cd Python-$PYVER/ ​ &&
 +./configure --prefix=$PYPATH && make -j2 && make install ​ &&
 +cd ..
 +echo Python installed.
 +
 +wget -c http://​pypi.python.org/​packages/​source/​v/​virtualenv/​virtualenv-1.5.1.tar.gz ​ &&
 +tar xf virtualenv-1.5.1.tar.gz ​ &&
 +cd virtualenv-1.5.1/ ​ &&
 +mkdir -p $VPYPATH ​ &&
 +$PYPATH/​bin/​python virtualenv.py $VPYPATH ​ &&
 +echo Virtualenv created.
 +
 +$VPYPATH/​bin/​pip install numpy  &&
 +echo Numpy installed.
 +
 +echo Done.  Your python is: $VPYPATH/​bin/​python
 +</​code>​
python/virtualenv.txt ยท Last modified: 2011/01/05 14:48 by tkbletsc