Linux Install: Difference between revisions
(github) |
(glm) |
||
Line 48: | Line 48: | ||
required: | required: | ||
* C++11 compiler (e.g. GCC 4.7 or higher) | |||
* [http://www.python.org/ Python] (with distutils) | * [http://www.python.org/ Python] (with distutils) | ||
* [http://pmw.sf.net Pmw] (Python Megawidgets) | * [http://pmw.sf.net Pmw] (Python Megawidgets) | ||
Line 59: | Line 60: | ||
* PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface) | * PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface) | ||
* [https://github.com/schrodinger/simplemmtf-python simplemmtf] (optional, for MMTF export) | * [https://github.com/schrodinger/simplemmtf-python simplemmtf] (optional, for MMTF export) | ||
* [https://glm.g-truc.net/ glm] | |||
On many Linux systems, one of the following commands installs all requirements (and must be run as root): | On many Linux systems, one of the following commands installs all requirements (and must be run as root): | ||
Line 64: | Line 66: | ||
<source lang="bash"> | <source lang="bash"> | ||
# Debian/Ubuntu/Mint | # Debian/Ubuntu/Mint | ||
apt-get install | apt-get install build-essential python-dev python-pmw libglew-dev \ | ||
freeglut3-dev libpng-dev libfreetype6-dev libxml2-dev \ | freeglut3-dev libpng-dev libfreetype6-dev libxml2-dev \ | ||
libmsgpack-dev python-pyqt5.qtopengl | libmsgpack-dev python-pyqt5.qtopengl libglm-dev | ||
# CentOS | # CentOS | ||
yum install | yum install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \ | ||
freeglut-devel libpng-devel freetype-devel libxml2-devel | freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel | ||
# Fedora | # Fedora | ||
dnf install | dnf install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \ | ||
freeglut-devel libpng-devel freetype-devel libxml2-devel | freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel | ||
# Gentoo | # Gentoo | ||
emerge -av | emerge -av dev-lang/python dev-python/pmw media-libs/glew \ | ||
media-libs/freeglut media-libs/libpng media-libs/freetype | media-libs/freeglut media-libs/libpng media-libs/freetype media-libs/glm | ||
# openSUSE | # openSUSE | ||
zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw | zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw glm | ||
# Sabayon | # Sabayon | ||
equo i -av | equo i -av dev-lang/python dev-python/pmw media-libs/glew \ | ||
media-libs/freeglut media-libs/libpng media-libs/freetype | media-libs/freeglut media-libs/libpng media-libs/freetype | ||
</source> | </source> | ||
=== Get latest source from | === Get latest source from Git === | ||
This will download the latest source to <code>/tmp/pymol</code>: | This will download the latest source to <code>/tmp/pymol</code>: |
Revision as of 01:10, 4 July 2018
This page describes how to install PyMOL on Linux.
Incentive PyMOL
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.
Download: https://pymol.org/
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.
Requirements
Libraries as well as development files (headers) of the following software is required:
- C++11 compiler (e.g. GCC 4.7 or higher)
- Python (with distutils)
- Pmw (Python Megawidgets)
- OpenGL driver (I use NVidia)
- GLEW
- GLUT/freeglut (optional, disable with
--no-glut
) - libpng
- freetype
- libxml2 (optional, for COLLADA export, disable with
--no-libxml
) - msgpack-c 1.0+ (optional, for fast MMTF loading, new in SVN r4167, disable with
--use-msgpackc=no
) - PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface)
- simplemmtf (optional, for MMTF export)
- glm
On many Linux systems, one of the following commands installs all requirements (and must be run as root):
# Debian/Ubuntu/Mint
apt-get install build-essential python-dev python-pmw libglew-dev \
freeglut3-dev libpng-dev libfreetype6-dev libxml2-dev \
libmsgpack-dev python-pyqt5.qtopengl libglm-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
# Fedora
dnf install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-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
This will download the latest source to /tmp/pymol
:
cd /tmp
git clone https://github.com/schrodinger/pymol-open-source.git
cd pymol-open-source
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 include
and lib
directories).
Compile and install
This will install PyMOL as normal user into $HOME/opt/pymol-svn
.
#!/bin/bash -e
prefix=$HOME/opt/pymol-svn
modules=$prefix/modules
# Example for dependencies in non-standard places
# export PREFIX_PATH="$HOME/extra/glew-2.0.0:$HOME/extra/libpng-1.6.5:/opt/local"
# If you want to install as root, then split this line up in "build"
# and "install" and run the "install" with "sudo"
python2.7 setup.py build install \
--home=$prefix \
--install-lib=$modules \
--install-scripts=$prefix
Now launch PyMOL like this:
$HOME/opt/pymol-svn/pymol
Optionally, in order to allow running the command pymol
from the terminal to launch the program do:
sudo ln -s $HOME/opt/pymol-svn/pymol /usr/bin/pymol
Troubleshooting
- 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.
- 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
Customized Installations
- Troels Linnet's installations scripts: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL