Saturday, June 5, 2010

How to install Python to your local directory

1. download source tarball from official website:

2. decompress the tarball:
tar -zxvf Python-2.5.tgz

3. change prefix in file Python-2.6.5/configure:
change: ac_default_prefix=/usr/local
to: ac_default_prefix=/home/username/local/lib/Python-2.6.5

4. run the following commands:
make install

5. after all the commands above have been done,
you need to add /home/username/local/lib/Python-2.6.5/bin to your PATH environment variable, and add /home/username/local/lib/Python-2.6.5/lib/python2.6 to PYTHONPATH


norcal_mark said...
This comment has been removed by the author.
norcal_mark said...

Thanks! Very helpful always need a little kick in the reminder area ...

Anonymous said...

worked nicely, thanks :)