Friday, 13 April 2012

How do you keep different versions of Python on a Linux server?

Needed 2.7.2
This was what I did ...
wondering if there's a better solution.

http://www.python.org/download/releases/2.7.2/

untar
copy to ~/Python27

./configuremake make test

didn’t run make install (copies to the default dir?)


needed then to install a python library ..

Then run the setup.py script. For example, to install under your home directory:
$ export PYTHONPATH=$HOME/lib/python
$ python setup.py install --home=$HOME
This will install package the code up in a python egg that is installed in $HOME/lib/python, and install wrapper scripts for all the tools into $HOME/bin.


Reference
http://eli.thegreenplace.net/2011/10/10/installing-python-2-7-on-ubuntu/

2 comments:

  1. I think Pythonbrew is awesome for this:

    https://github.com/utahta/pythonbrew

    ReplyDelete
  2. I would use make altinstall and create a different enviroment to use python2.7 everytime I would really need need with virtualenvwrapper.


    http://askubuntu.com/questions/17841/will-python2-7-be-available-for-10-04-in-the-future

    ReplyDelete

Datanami, Woe be me