Install Parallel versions of Python from source

Few programs require certain versions of python. Especially, when you do not have root permission in your unix machine, you can still install a python version in your /home/usr directory. You can run it in parallel to in-built version. Follow these steps:

1. Unpack with tar -xvf python-x.x.tar

2. ./configure

3. make altinstall prefix=~ exec-prefix=~ (./lib and ./bin will be created in your home directory(~))

4. create alias for python-x.x => i.e cd ~/bin/ > ln -s python-x.x python ! If you create this outside bin directory, you will get a warning (ln: symbolic link already exists !! remember it refers to inbuilt python)

5. Complete alias creation by editing: vi ~/.bashrc with alias python='~/bin/python'

Now any software you try to install with python it will access the version you installed in your home !

You can still install softwares using your version by skipping steps 4 & 5. But, everytime you need to keep specifying the export PATH & export PYTHONPATH ! Which is a way roundabout !


Popular posts from this blog

Condense fasta header

Map multiple annotations using pandas

Fasta Header Replacer