Download and install PyMOL 1.2 on Ubuntu Linux

PyMOL is a molecular visualisation tool originally developed by Dr. Warren DeLano, who unfortunately passed away about one week ago. It is the most intuitive program of its kind I’ve used, it supports scripting with both its own “language” and Python, and best of all, it’s free and open-source. This is a small guide on how to install PyMOL on Ubuntu. It’s my own contribution to the effort of keeping PyMOL alive even after its founder’s death.

If you’re looking for a(n even) simple(r) method, just apt-get pymol:

sudo apt-get install pymol

If you want the last version though, which is likely NOT to be in the repositories, this is how you do it. Again, PyMOL Wiki has pretty much all the info you need, this is just my own recollection :)

The most recent version is usually the one you want to install and is only available through Subversion. To download it, you first need to install a Subversion client. The easiest is:

sudo apt-get install subversion

Then, you need to download PyMOL itself using this tool. It takes quite a bit (a couple of minutes). The following command will create a directory where it will download the software components needed for the installation. I’ll install mine on /home/joao/Software

cd /home/joao/Software
svn co pymol

This will create a directory called pymol which has all the following structure:

joao@muse:~/Software$ ls pymol/
aclocal.m4    config.sub    DEVELOPERS  layer3       Makefile.delsci  products
acsite.m4     configure     examples    layer4      README
AUTHORS  INSTALL     layer5       missing          scripts    contrib       install-sh  LICENSE      modules          setup
ChangeLog     COPYING       layer0    NEWS   
config.guess  data          layer1      m4           ov        depcomp       layer2  PACKAGING        test

If you try to run the files, they will break because you are most likely missing dependencies. PyMOL needs the following packages to work properly:

python-dev ( will install python-dev and python obviously )

python-pmw ( will install tcl8.x and tk8.x as well, and these are also needed )

libpng-dev ( will install libpngxx and libpngxx-dev )

freeglut-dev ( will install freeglutx-dev and freeglutx, as well as a bunch of other packages )

libfreetypeX-dev ( will install libfreetypeX and libfreetypeX-dev )

And also, if you’re in a clean, pure, freshly installed system you’ll need the usual bunch: sudo apt-get install build-essential

After these are solved, you can proceed to actually install PyMOL. First, you have to know if you want to install it system-wide (you’ll need root privileges for this) or locally ( in a place like your home directory, which is our case ). Local installtion is easier to maintain in my opinion, and you always have permissions for it so that’s the one I’ll explain.

Enter the pymol directory and run this command:

python install --prefix /path/to/install/directory

The part in bold is where you define the location of the installation directory. So, in my case, I want my PyMOL to be installed in /home/joao/Software/pymol I put this in front of the –prefix.

After the building is completed, you’ll have to do one thing extra ( and not mentioned in the final output of ):

export PYTHONPATH=$PYTHONPATH:/path/to/install/lib/python{version}/site-packages


This basically tells the next script,, where to find the pymol libraries/modules/whatever it needs to install. In my example, they are in the pymol directory ( the one I chose in the prefix ). So, my command looks like:

export PYTHONPATH=$PYTHONPATH:/home/joao/Software/pymol/lib/python2.6/site-packages/


Then, the second script can be called:

python install --prefix /home/joao/Software/pymol


This will create a pymol executable in the directory you chose. You can then link this executable to make it available easily with:

sudo ln -s /home/joao/Software/pymol/pymol /usr/bin


And now, running pymol in your command line should launch PyMOL smoothly! Easy :) This approach also has the advantage of updating your pymol super easily:

svn up


If you do the previous in your pymol directory it will fetch the latest versions of each file. I “think” (I’m not sure) that this will not need another installation round, but in any case, it’s easy enough.

That’s it, your ready to use PyMOL to create lovely pictures and check your molecules! Check here for tutorials. And if you’re in a generous mood, consider donating to the Warren DeLano Memorial Fund. It will help keep open-source initiatives such as PyMOL alive.


4 thoughts on “Download and install PyMOL 1.2 on Ubuntu Linux

  1. olha lá, uma cena que me esquece sempre quando vou instalar. Não é que tenha o problema, mas para deixar aqui registado.

    no linfreetypeX, o ‘X’ refere-se ao número da versão, actualmente vai no 6. Isto porque eu tive muito tempo há procura do ‘X’ e não encontrei :D

  2. Nop, you can download the latest for free, you just have to go through all this “hassle” to install it. ;) Just follow the tutorial and you’ll be fine :D

  3. Very nice!!

    Just a Question… I read that only version 0.99 was free. The others you needed to pay..

    “urrent PyMOL Subscribers may download version 1.2 builds directly or access them through online documentation”

    maybe you are there in Standford have access directly from the university..

    What I mean is..

    manda-me essa merda pro mail! :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s