This is a read-only mirror of pymolwiki.org

Difference between revisions of "Linux Install"

From PyMOL Wiki
Jump to navigation Jump to search
(setup.py updates in SVN rev 4021)
Line 80: Line 80:
 
python setup.py build install \
 
python setup.py build install \
 
     --home=$prefix \
 
     --home=$prefix \
     --install-lib=$modules
+
     --install-lib=$modules \
 
+
    --install-scripts=$prefix
export PYTHONPATH=$modules:$PYTHONPATH
 
python setup2.py install
 
install pymol $prefix/
 
 
</source>
 
</source>
  
Line 104: Line 101:
 
</div>
 
</div>
  
* If you get an error message "ImportError: No module named Pmw" and lack half of the user interface, then run the additional command
+
* If you get an error message "ImportError: No module named Pmw" and lack half of the user interface, then append <code>--bundled-pmw</code> to the install command line.
<div style="margin-left: 2em;">
 
<source lang="bash">
 
python setup2.py install pmw
 
</source>
 
to install a copy of the Python MegaWidgets.
 
</div>
 
  
 
* If you're using Ubuntu 11.10 with an Intel Sandy Bridge video card and get graphics oddities. Please see [https://launchpad.net/~glasen/+archive/intel-driver Intel Driver Post for Ubuntu].
 
* If you're using Ubuntu 11.10 with an Intel Sandy Bridge video card and get graphics oddities. Please see [https://launchpad.net/~glasen/+archive/intel-driver Intel Driver Post for Ubuntu].

Revision as of 08:39, 18 February 2013

This page describes how to install open-source PyMOL on Linux.

Install distribution specific binary package

Many Linux distributions provide binary packages for open-source PyMOL. They often do not provide the latest version, but if the provided package fits your needs this is the most convenient way to install PyMOL.

Command line install examples for some popular distributions:

# Debian/Ubuntu/Mint
sudo apt-get install pymol

# Fedora
yum install pymol

# Gentoo
emerge -av pymol

# openSUSE (12.1 and later)
sudo zypper install pymol

# CentOS with EPEL
rpm -i http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
yum --enablerepo=epel install pymol

Install from source

Installation from source gives you the latest version and is the generic way to install PyMOL.

Requirements

Libraries as well as development files (headers) of the following software is required:

  • Subversion to download the source code
  • Python (with distutils)
  • Pmw (Python Megawidgets)
  • OpenGL driver (I use NVidia)
  • libpng
  • freetype

On many Linux systems, one of the following commands installs all requirements:

# Debian/Ubuntu/Mint
sudo apt-get install subversion build-essential python-dev python-pmw libglew-dev freeglut3-dev libpng-dev libfreetype6-dev

# Fedora/CentOS
yum install subversion yum install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel freeglut-devel libpng-devel freetype-devel

# Gentoo
emerge -av dev-vcs/subversion dev-lang/python dev-python/pmw media-libs/glew \
  media-libs/freeglut media-libs/libpng media-libs/freetype

# openSUSE
sudo zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw subversion

Get latest source from SVN

This will download the latest source to /tmp/pymol:

cd /tmp
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol
cd pymol

Compile and install

This will install PyMOL as normal user into /opt/pymol-svn. If you don't have write permissions to /opt, change the prefix variable to something like $HOME/pymol-svn.

#!/bin/bash -e

prefix=/opt/pymol-svn
modules=$prefix/modules

python setup.py build install \
    --home=$prefix \
    --install-lib=$modules \
    --install-scripts=$prefix

Now launch PyMOL like this (you may copy this launcher into your $PATH, like to /usr/local/bin):

/opt/pymol-svn/pymol

Troubleshooting

  • On Linux Mint 11 there have been reports of gcc-4.5 breaking Pymol. You could use gcc-4.4 instead. (reported by User:Tlinnet)
sudo apt-get install build-essential gcc-4.4 g++-4.4
export CC=/usr/bin/gcc-4.4
  • If you get an error message "ImportError: No module named Pmw" and lack half of the user interface, then append --bundled-pmw to the install command line.

Customized Installations