Linux Install: Difference between revisions
m (→Fedora: Typho) |
(→Generic Linux: Rewrite and merged information.) |
||
Line 10: | Line 10: | ||
== Generic Linux == | == Generic Linux == | ||
=== | === From Source === | ||
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. | 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 [http://subversion.tigris.org/ Subversion] client installed, have | This quick install assumes you already have a [http://subversion.tigris.org/ Subversion] client installed, have internet access, and all the dependencies are satisfied. | ||
To obtain a copy of the current revision version issue the command: | |||
<source lang="bash"> | <source lang="bash"> | ||
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol | svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol | ||
</source> | |||
Then go into the source directory: | |||
<source lang="bash"> | |||
cd pymol | cd pymol | ||
</source> | </source> | ||
=== | If you have root or superuser privileges you can continue with the installation. If not follow this guide [http://pymolwiki.org/index.php/Linux_Install#Installing_without_root_Privileges normal user] | ||
Run the first stage of the installation: | |||
<source lang="bash"> | |||
python setup.py install | |||
</source> | |||
Run the second stage of the installation: | |||
<source lang="bash"> | |||
python setup2.py install | |||
</source> | |||
A launch script '''pymol''' will have been created. You can copy this script in the /usr/local/bin directory, so that any user of the system can use PyMOL: | |||
<source lang="bash"> | |||
cp ./pymol /usr/local/bin | |||
</source> | |||
Test your installation. If you get an error message "ImportError: No module named Pmw" and lack half of the user interface, then run the additional command: | |||
<source lang="bash"> | |||
python setup2.py install pmw | |||
</source> | |||
If you want to update the source code to the latest svn revision, go into the pymol directory and issue the command: | |||
<source lang="bash"> | |||
svn up | |||
</source> | |||
To uninstall the PyMOL: | |||
<source lang="bash"> | |||
python setup2.py uninstall | |||
</source> | |||
==== Installing without root Privileges ==== | |||
Use the prefix command to specify where to install PyMOL: | |||
<source lang="bash"> | |||
python setup.py install --prefix /dir_to/pymol/py_build | |||
</source> | |||
Then, you'll need to modify your '''PYTHONPATH''' variable: | |||
<source lang="bash"> | |||
export PYTHONPATH=$PYTHONPATH:/dir_to/pymol/py_build/lib/python{version}/site-packages | |||
</source> | |||
Install to prefix: | |||
<source lang="bash"> | |||
python setup2.py install --prefix /dir_to/pymol/py_build | |||
</source> | |||
Now you can run PyMOL: | |||
<source lang="bash"> | <source lang="bash"> | ||
./pymol | |||
</source> | </source> | ||
===Compiling By Hand=== | === 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 | 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 | * tcl-8_4_11.tgz | ||
Line 62: | Line 107: | ||
====Supported Packages==== | ====Supported Packages==== | ||
The above packages don't need to be installed from their source-packages only. That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages. '''Just be sure, if you install the above packages with your system's installer, that you also include the development packages. PyMOL needs the source/header files to compile against. For example, don't only install, ''freeglut-2.4.0'' but also look for, and install, ''freeglut-2.4.-devel'' '''. | The above packages don't need to be installed from their source-packages only. That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages. '''Just be sure, if you install the above packages with your system's installer, that you also include the development packages. PyMOL needs the source/header files to compile against. For example, don't only install, ''freeglut-2.4.0'' but also look for, and install, ''freeglut-2.4.-devel'' '''. | ||
Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''. | Once downloaded, see the file '''pymol/INSTALL''' and '''pymol/INSTALL.generic'''. | ||
Line 83: | Line 126: | ||
* ensure you have the correct Python path and version (is it 2.3? 2.4?) | * 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]]) | * 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= | LIBP = $(exec_installdir)/lib'''''64'''''/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'. | 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'. | ||
== External Links to Distribution-specific Packages == | == External Links to Distribution-specific Packages == |
Revision as of 19:12, 2 April 2009
Installing PyMol is quite straightforward.
PyMol
Installing PyMol is very simple, even from source. On Linux, you need the following requirements:
Generic Linux
From Source
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 internet access, and all the dependencies are satisfied.
To obtain a copy of the current revision version issue the command:
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol
Then go into the source directory:
cd pymol
If you have root or superuser privileges you can continue with the installation. If not follow this guide normal user
Run the first stage of the installation:
python setup.py install
Run the second stage of the installation:
python setup2.py install
A launch script pymol will have been created. You can copy this script in the /usr/local/bin directory, so that any user of the system can use PyMOL:
cp ./pymol /usr/local/bin
Test your installation. If you get an error message "ImportError: No module named Pmw" and lack half of the user interface, then run the additional command:
python setup2.py install pmw
If you want to update the source code to the latest svn revision, go into the pymol directory and issue the command:
svn up
To uninstall the PyMOL:
python setup2.py uninstall
Installing without root Privileges
Use the prefix command to specify where to install PyMOL:
python setup.py install --prefix /dir_to/pymol/py_build
Then, you'll need to modify your PYTHONPATH variable:
export PYTHONPATH=$PYTHONPATH:/dir_to/pymol/py_build/lib/python{version}/site-packages
Install to prefix:
python setup2.py install --prefix /dir_to/pymol/py_build
Now you can run PyMOL:
./pymol
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)
Supported Packages
The above packages don't need to be installed from their source-packages only. That is, you can use your system's installer (eg. yum, YaST, apt-get, rpm, etc.) to install the packages. Just be sure, if you install the above packages with your system's installer, that you also include the development packages. PyMOL needs the source/header files to compile against. For example, don't only install, freeglut-2.4.0 but also look for, and install, freeglut-2.4.-devel .
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'.
External Links to Distribution-specific Packages
Some of the detailed information in the subsequent sections may be obsolete, so here are links to package information pages:
- Fedora: [1]
- RHEL: [2]
- Ubuntu: [3]
- Debian: [4]
- OpenSUSE: [5]
- Gentoo-portage: [6]
Fedora
Starting from Fedora 9, you can install PyMOL from yum repositories.
As root:
yum install pymol
This will install the latest precompiled version of PyMol. If you want the bleeding edge version or you have an older version of the operating system, follow the instructions for Generic Linux. In order to satisfy all dependencies necessary for compiling from source issue as root (or superuser) the following command:
yum install python-devel freeglut-devel freetype-devel tkinter python-pmw
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 in portage pymol for gentoo
A version of the latest svn build is avaible via the dberkholz overlay, which can be used with
layman -a dberkholz && emerge =sci-chemistry/pymol-9999
There is ongoing development in providing plugins via ebuilds with an thread in gentoo bugzilla. The ebuild can be checked out via svn
svn co http://svn.olausson.de/molmod/trunk
There is also svn ebuild of pymol, which contains all bugfixes which are request in the gentoo bugzilla.
All bugs and feature request should be either send to justin at j-schmitz dot net or spamsuxx at gmail dot com.
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.
NOTE : If you experience problems with PyMOL OpenGL window (i.e. flickering) try disabling compiz.
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
Super-Large Files
For loading files that require the majority of your system's memory, try tweaking your system's ulimit before starting PyMOL. Be warned, when your system uses its full amount of memory and swap space, it comes to a halt very quickly.
# shows current setup
ulimit -a
# allows setting of a limit in current shell.
ulimit -v SizeInKB