This page describes how to install PyMOL on Linux.
Schrödinger provides pre-compiled (64 bit) PyMOL to paying sponsors. The bundle also includes ready-to-use APBS, RigiMOL, an MPEG encoder for movie export, and a small molecule energy minimization engine.
Open-Source PyMOL in Linux Distros
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 (note that all of these commands must be run as root or superuser):
# Arch/Manjaro pacman -S 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 # Debian/Ubuntu/Mint apt-get install pymol # Fedora dnf install pymol # Gentoo emerge -av pymol # openSUSE (12.1 and later) zypper install pymol # Sabayon equo i -av pymol
Install from source
Installation from source gives you the latest version and is the generic way to install PyMOL.
Please also consult the INSTALL file.
Libraries as well as development files (headers) of the following software is required:
- C++11 compiler (e.g. GCC 4.7 or higher)
- Python 3.6+
- OpenGL driver (I use NVidia)
- libxml2 (optional, for COLLADA export, disable with
- msgpack-c 2.1.5+ (optional, for fast MMTF loading, new in SVN r4167, disable with
- PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface if compiled with
- mmtf-cpp (optional, for MMTF export, disable with
- libnetcdf (optional, disable with
- Pmw (Python Megawidgets, for legacy GUI/plugins)
- GLUT/freeglut (enable with
On many Linux systems, one of the following commands installs all requirements (and must be run as root):
# Debian/Ubuntu/Mint apt-get install git build-essential python3-dev libglew-dev \ libpng-dev libfreetype6-dev libxml2-dev \ libmsgpack-dev python3-pyqt5.qtopengl libglm-dev libnetcdf-dev # CentOS yum install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \ freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel \ msgpack-devel netcdf-devel # Fedora dnf install gcc gcc-c++ kernel-devel python3-devel glew-devel PyQt5 msgpack-devel \ freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel # Gentoo emerge -av dev-lang/python dev-python/pmw media-libs/glew \ media-libs/freeglut media-libs/libpng media-libs/freetype media-libs/glm # openSUSE zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw glm # Sabayon equo i -av dev-lang/python dev-python/pmw media-libs/glew \ media-libs/freeglut media-libs/libpng media-libs/freetype
Get latest source from Git
git clone https://github.com/schrodinger/pymol-open-source.git git clone https://github.com/rcsb/mmtf-cpp.git mv mmtf-cpp/include/mmtf* pymol-open-source/include/ cd pymol-open-source
The master branch requires Python 3.6+. Use the legacy py2 branch for Python 2.7 compatibility.
Libraries in non-standard places
Optional: You may use the colon-delimited
$PREFIX_PATH variable to point
setup.py to non-standard locations of libraries and headers (those locations should have
Compile and install
This will install PyMOL as normal user into
#!/bin/bash -e prefix=$HOME/pymol-open-source-build # Example for dependencies in non-standard places # export PREFIX_PATH="$HOME/extra/glew-2.0.0:$HOME/extra/libpng-1.6.5:/opt/local" python3 setup.py build install \ --home=$prefix
Now launch PyMOL like this:
- Do do a "clean" build, remove the "build" directory (sometimes necessary if "git pull" changed header files)
- If you are using Ubuntu with a NVIDIA graphic card and generic drivers you may experience bad rendering, black pixelation and other graphical oddities. A guide to installing NVIDIA proprietary drivers can be found under Ubuntu community Nvidia Drivers How To
- Troels Linnet's installations scripts: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL