PyMol on Linux without Conda

Wednesday 30 January 2019

PyMol on Linux without Conda

A wee note about installing PyMol on Linux for Python3 without Conda.

Academic version installer. PyMol can be installed on Windows, Mac and Linux with an installer, this will have it's own python. The Pro version of PyMol is a 'portable' and I could not force it use Python 3 on Linux... maybe it is possible, but I doubt it.

Conda. Alternatively, it can be installed with anaconda for both Python 2 and now Python 3 even on Linux.
Until March 2019 `conda install -c schrodinger pymol` with a 3.7 Conda did not work under Ubuntu or CentOS — It does now.
If however, one wants to install PyMol using Python 3 on Linux without Conda it is not simple — there are various specific reasons for doing this, but generally conda is the best way for both PyMol and Rdkit.

Disco Dingo apt. There appearts to be a `python3-pymol` aptitude package for Ubuntu Disco Dingo, but not earlier versions (current stable is Bionic Beaver — or version 18.4 if you are one of those people that hates the animal names).

Compile. The following commands will compile PyMol opensource under Python3 in Unix. For other versions, see the internet.

#get all prerequisites
sudo apt-get install python3 #or anaconda3
sudo apt-get install python3-dev libglm-dev freeglut3-dev libglew-dev libpng12-dev libfreetype6-dev build-essential libxml++3.6-dev
pip3 install pmw numpy
prefix=/opt/Pymol/
modules=$prefix/modules
mkdir -p $prefix
sudo python3 setup.py build install --home=$prefix --install-lib=$modules --install-scripts=$prefix
#add the module to python
sudo echo $modules > /usr/lib/python3/dist-packages/pymol.pth

No comments:

Post a Comment