This is a read-only mirror of pymolwiki.org
Difference between revisions of "Linux Install"
Line 54: | Line 54: | ||
* pmw-1_2.tgz | * pmw-1_2.tgz | ||
* freetype-2_1_10.tgz | * freetype-2_1_10.tgz | ||
− | + | --and-- | |
− | + | * (freeglut-2_4_0.tgz | |
− | + | --or-- | |
− | * freeglut-2_4_0.tgz | + | * glut-3_7_6.tgz) |
− | |||
− | * glut-3_7_6.tgz | ||
Revision as of 16:45, 6 December 2007
Installing PyMol is quite straightforward.
PyMol
Installing PyMol is very simple, even from source. On Linux, you need the following requirements:
Generic Linux
Quick Install for Latest Features
Many people want the latest versions of PyMOL as they usually have valuable features, but don't want to build PyMOL. Building PyMOL is generally very simple.
This quick install assumes you already have a Subversion client installed, have some sort of superuser (root) access, and have internet access. It will download the most current version from PyMOL's Projet Page and install it. This should install PyMOL onto your system so that any users on your system can use it. To easily get the latest version, do the following:
mkdir pymol_temp
cd pymol_temp
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol
cd pymol
sudo python setup.py install
sudo python setup2.py install
sudo cp ./pymol /usr/local/bin/pymol
Now, just remove the pymol_temp directory if you want and you're done.
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. The ext package is available from the Source Forge download section and contains all the necessary software to make PyMol run. In the most recent available version (0.99rc1) this includes
- tcl-8_4_11.tgz
- tk-8_4_11.tgz
- zlib-1_2_3.tgz
- libpng-1_2_8.tgz
- python-2_4_2.tgz
- numeric-24_2.tgz
- pmw-1_2.tgz
- freetype-2_1_10.tgz
--and--
- (freeglut-2_4_0.tgz
--or--
- glut-3_7_6.tgz)
Once downloaded, see the file pymol/INSTALL and pymol/INSTALL.generic.
Here's the basic steps to install by source:
- get the source PyMol Source
- extract both packages, rename ext-VERSION.tgz to ext and move it into the pymol directory
- cd pymol
- cd ext
- vi build.com # edit the build file
- cd ..
- cp setup/Rules.make . # or correct Rules.make file for your machine
- vi Rules.make # make appropriate changes
- vi setup.py # make appropriate changes
- 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. For x86_64, besides above files, change following line in contrib/modules/Makefile.pre.in.src pointing to lib64 (leafyoung at yahoo dot com)
LIBP= $(exec_installdir)/lib64/python$(VERSION)
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
xorg.conf for stereo in Fedora Core 6
It is assumed that you have installed the proprietary Nvidia graphics drivers, and that the "Device" section of xorg.conf has the following line in it:
Driver "nvidia"
Add the following section to the end of xorg.conf to disable "Composite", which is incompatible with stereographics.
Section "Extensions" Option "Composite" "Disable" EndSection
In Section "Screen" add the following line to enable quad-buffered stereo:
Option "Stereo" "3"
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