This is a read-only mirror of pymolwiki.org

Linux Install

From PyMOL Wiki
Revision as of 10:17, 12 March 2007 by Pierre (talk | contribs) (→‎libnvidia-tls.so.1: cannot handle TLS data)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installing PyMol is quite straightforward.

PyMol

Installing PyMol is very simple, even from source. On Linux, you need the following requirements:

  • Python (with distutils)
  • Pmw (Python Megawidgets)
  • OpenGL driver (I use NVidia)

Generic Linux

0.99rc1 note!

For those keeping current via CVS, building from source, or installing precompiled unix binaries, here is a quick "heads up!" intended to save you some minor grief: For the last six years, the PyMOL launch script has been called pymol.com instead of simply "pymol". I can't remember why I did things that way, but PyMOL's ".com" convention is different from the most everything else and for no good reason. The launch script should just be the name of the program.

Therefore, as of 0.99rc1, the launch script will simply be "pymol". No big deal right? Well, not so fast: symbolic links, shell aliases, external scripts, package builders, and end-user habits may all need to be adjusted after installing this next version. That is why I haven't changed this before now -- but we should clean this up before 1.0. So, remember: if you update to PyMOL 0.99rc1 (when it's released) and suddenly can't launch PyMOL, that is likely what is going on. Either reset your pointers to ./pymol, or symlink ./pymol to ./pymol.com to preserve the status quo.

From Source

  • untar the compressed package;
  • cd into the newly untarred directory (should be pymol or pymol-version).
  • execute
    python setup.py install            # you may need to be root
    
  • execute
    python setup2.py install           # you may need to be root
    
  • execute
    cp ./pymol.com SOME_PATH           # where SOME_PATH is some directory in your $PATH
    

or for the latest version,

  • execute
    cp ./pymol SOME_PATH           # where SOME_PATH is some directory in your $PATH
    

The executable name is "pymol.com".

From Package

Download the appropriate RPM and use 'rpm' to install it. Typically,

rpm -Uvh rpmFileName.rpm

Compiling By Hand

Due to the large variance of Linux systems, some systems may work fine with PyMol, and some may have related install issues. To overcome this, you can download the ext package and the PyMol source and compile/install by hand.

Once downloaded, see the file pymol/INSTALL and pymol/INSTALL.generic.

Here's the basic steps to install by source:

  1. get the source PyMol Source
  2. extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory
  3. cd pymol
  4. cd ext
  5. vi build.com # edit the build file
  6. cd ..
  7. cp setup/Rules.make . # or correct Rules.make file for your machine
  8. vi Rules.make # make appropriate changes
  9. vi setup.py # make appropriate changes
  10. make

Warnings:

  • if you're using a 64-bit machine, lib becomes lib64 for almost everything
  • ensure you have the correct Python path and version (is it 2.3? 2.4?)
  • make sure you make the changes in Rules.make, setup.py, and Makefile, for your platform.

Copy the appropriate setup/Rules.XXX file to the base PyMol dir. You'll have to edit the file for your system. Then run 'make'.

Fedora Core Linux (x86)

PyMOL RPMs are available for Fedora Core 1 & 2, provided by Morten Kjeldgaard. These can be manually downloaded by browsing from: [1]

Alternatively, PyMOL can be installed using Yum (an automated package installer and updater, installed by default in Fedora). This can be done by adding the following lines to your /etc/yum.conf file:

[xray]
name=MOKs RPM Repository fedora $releasever - $basearch - xray
baseurl=http://apt.bioxray.dk/fedora/fc$releasever/$basearch/xray


you may also need to add the pgp key for the repository before yum will get packages from it by either saying:

rpm --import http://www.bioxray.dk/~mok/404825e7.asc

or with older versions of rpm:

wget http://www.bioxray.dk/~mok/404825e7.asc
rpm --import 404825e7.asc


And then issuing the following command as root:

yum install pymol

Gentoo Linux (x86)

as root:

emerge pymol

be sure to have the proper OpenGL configuration. For example:

opengl-update ati
opengl-update nvidia

list of available versions of pymol for gentoo

SuSe

32-bit (x86)

See #Generic Linux above.

64-bit (x86_64)

See #Generic Linux above. Some details for problem solving are here. 64-bit Python install is quite easy. Make sure your nvidia driver is installed (or ATI, but I have no experience there).

To install PyMol

  • Ensure your system has it's distutils in place and ready to use. Try the following check:
from distutils import *
  • Download the source
  • Download Pmw from SourceForge.
    • To install Pmw, just decompress it and then move the base director "Pwm" to /usr/lib64/python2.3/site-packages/. You can test that it's there by testing the import, see below:
import * from Pmw

If errors erupt, investigate.

  • decompress the source and cd into the PyMol directory that was just decompressed.
  • If upgrading see below.
  • Now enter the following...

python setup.py build
sudo python setup.py install
sudo python setup2.py

  • The sudo commands will need a root password or someone with sudo capabilities.

I also copy the 'pymol.com' file to /usr/local/bin or /usr/bin -- somewhere in my path:

sudo cp ./pymol.com /usr/local/bin

Please note that newer versions of PyMol create the pymol executable, not pymol.com. So, for later versions (~0.99+) use

sudo cp ./pymol /usr/local/bin


You should now have a working PyMol install.

pymol.com should now run your new PyMol install.

Ubuntu Linux (x86 32,64; mac ppc)

http://xanana.ucsc.edu/~wgscott/xtal/ubuntu-small.png

The Ubuntu pymol package can be installed with minimal effort using the GUI package manager synaptic, or on the command line, using the command

sudo apt-get install pymol

once the universe repository has been activated.

Ubuntu is a completely free and well-maintained Debian GNU/Linux distribution. Further details on using Ubuntu for crystallography and related applications are available are linked. PyMol also compiles from source on Ubuntu following the #Generic Linux instructions given above.

Preparing your System

See Linux_XFree86_Configuration.

Graphics

XFree86 Config

Check out Configuring XFree86 if you need information on editing the XFree86 configuration file.

Xorg

Adding a

Stereo 3

option in /etc/X11/xorg.conf suffices to run pymol in stereo mode on a 64bit system with the Nvidia Quadro FX1400 under Red Hat Enterprise 4 (RHEL4). Adding the following modeline (determined via /usr/bin/gtf):

ModeLine     "1280x1024_118.00" 229.7 1280 1384 1528 1776 1024 1025 1028 1096 -hsync +vsync

appears to slightly improve the stereo quality, in particular when one displays labels and/or dashes/dots.

For those having possible driver issues, this link might help NVNews

Problems

Input

If you notice that the keyboard input is ignored into the Pmw widgets, you may have an X-based input method editor installed and running. Such examples could be SCIM, KINPUT/2 or the like. Try turning off the IME and restarting PyMol to get the widgets to recognize your input.

libnvidia-tls.so.1: cannot handle TLS data

If you get an error, upon invoking pymol, of the form

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/pymol/__init__.py", line 109, in ?
    import pymol
  File "/usr/lib/python2.4/site-packages/pymol/__init__.py", line 353, in ?
    import _cmd
ImportError: libnvidia-tls.so.1: cannot handle TLS data

then try changing the permissons on libnvidia-tls.so.1. i.e,

 sudo chmod 777 /usr/lib/libnvidia-tls.so.1