How to install PyMOL on Windows
Introduction
PyMOL is a user-sponsored molecular visualization system on an open-source foundation, maintained and distributed by Schrödinger.1 There are official binaries available for students,2 and unofficial versions out there as well. But the educational-use-only PyMOL is not provided for the purposes of academic research or publication.
So, I will explain how to install the unofficial PyMOL software in this tutorial.
PyMOL was written in the programming language Python, normal operation of the program required the Python environment. It's recommended to using Anaconda to create an isolated Python environment for PyMOL, if you need to use other softwares required Python environment in the future.
Install Anaconda to Create Python Environment
- Download Anaconda and install it (see: https://docs.anaconda.com/anaconda/install/windows/).
Anaconda is a distribution of the Python and R programming languages for scientific computing that aims to simplify package management and deployment.
- To verify Anaconda was installed successful, Open
Anaconda Powershell Prompt (Anaconda3) or
Anaconda Prompt (Anaconda3) on
Windows Start Menu, type
conde
in the command line window and press enter key, you will see some information as below.
1 | (base) C:\Users\jiangshen>conde |
- Enter
conda create -n pymol python=3.8
to create an insolated Python environment for PyMOL.
1 | (base) C:\Users\jiangshen>conda create -n pymol python=3.8 # create an isolated environment named pymol which Python version is 3.8 |
- Enter
conda activate pymol
to activate pymol environment.
1 | (base) C:\Users\jiangshen>conda activate pymol # activate and enter the environment |
The command line window will become as below.
1 | (pymol) C:\Users\jiangshen> |
- (optional) Enter
conda deactivate
to come back base environment if you need.
1 | (pymol) C:\Users\jiangshen>conda deactivate |
Install PyMOL in One Line of Command
There is an easy way to install PyMOL in one line of command on conda3:
- Just run
conda install -c conda-forge pymol-open-source
on pymol environment.
1 | (pymol) C:\Users\jiangshen>conda install -c conda-forge pymol-open-source |
- After installation finished, enter
pymol
on Anaconda Prompt to launch PyMOL.
1 | (pymol) C:\Users\jiangshen>pymol |
(Optional) Install PyMOL by Pre-compiled Files
Or you can install PyMOL by pre-compiled files4, 5:
- Enter
conda install -c conda-forge numpy pmw
to install supporting packages on pymol environment.
1 | (pymol) C:\Users\jiangshen>conda install -c conda-forge numpy pmw # install supporting packages on pymol environment. |
- Enter
python --version
to check you Python version of pymol environment.
1 | (pymol) C:\Users\jiangshen>python --version |
Download pre-compiled Open-Source PyMOL from Christoph Gohlke of the Laboratory for Fluorescence Dynamics, University of California, Irvine.
The following two files are required:
1 | pymol‑2.5.0‑cp38‑cp38‑win_amd64.whl |
- Move two files above into a new directory (e.g. C:), enter the following commands step by step on Anaconda Prompt* to install PyMOL.
1 | (pymol) C:\Users\jiangshen>pip install "C:\Downloads\pymol‑2.5.0‑cp38‑cp38‑win_amd64.whl" # install pymol-2.5.0 |
- After all, you will find PyMOL.exe file in below directory.
1 | C:\Users\YOUR_USER_NAME\anaconda3\envs\pymol |
Click the file and right click, Send To Desktop. Double click the PyMOL icon on desktop to launch PyMOL.
Or enter pymol
on Anaconda
Prompt to launch PyMOL.
1 | (pymol) C:\Users\jiangshen>pymol |
- (optional) If you prefer viewing PyMOL in a single-window interface,
install PyQt5 with
pip install pyqt5
.
1 | (pymol) C:\Users\jiangshen>pip install pyqt5 # install PyQT5 |
References
[1] https://pymol.org/2/
[2] https://pymol.org/edu/?q=educational/
[3] https://anaconda.org/conda-forge/pymol-open-source
[4] http://www.lfd.uci.edu/~gohlke/pythonlibs/
[5] https://omicx.cc/posts/2021-04-20-install-pymol-windows/