How to Install Open Source PyMOL on Windows 10

It is possible to get an installer for the crystallographer’s favourite molecular visualization tool for Windows machines, that is if you are willing to pay a fee. Fortunately, Christoph Gohlke has made available free, pre-compiled Windows versions of the latest PyMOL software, along with all of it’s requirements, it’s just not particularly straightforward to install. The PyMOLWiki offers a three-step guide on how to do this and I will break it down to make it somewhat clearer.

1. Install the latest version of Python 3 for Windows

Download the Windows Installer (x-bit) for Python 3 from their website, x being your Windows architecture – 32 or 64.

Then, follow the instructions on how to install it. You can check if it has installed by running the following in PowerShell:

py

If it is installed, you should get this:

2. Install the latest Microsoft Visual C++ Redistributable for Visual Studio

Fairly straightforward, download and install the current Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019, again making sure to pick the right version for your Windows architecture.

I have a 64-bit Windows, so I downloaded the highlighted version.

3. Download all required wheel files

There are three main requirements to install PyMOL: pip, Numpy and PMW. The Python installation comes with pip, so download numpy and pmw from the links above. For numpy, download the latest numpy+mkl file for the Python version you have installed and the one matching your Windows architecture. For example, for Python 3.10 on a 64-bit Windows, download the numpy‑1.22.3+mkl‑cp310‑cp310‑win_amd64.whl file.

On the same page, Ctrl+F PMW to find the two available PMW .whl files, and download the Python 3 version.

Similarly, download the PyMOL .whl files, there are two: the PyMOL launcher and PyMOL itself – again, check that they match your Python version and Windows architecture.

Make sure all .whl files are in the same file directory.

4. Install requirements and PyMOL from wheels

Open an instance of Windows PowerShell and change to the directory where you have all the .whl files (with the cd command). Install numpy and PMW from the wheels FIRST, using the following command in PowerShell or follow these instructions:

py -m pip install your_wheel_file.whl

You should install them in this order:

  • Numpy
  • PMW
  • PyMOL
  • PyMOL launcher

5. Launch PyMOL

PyMOL should now be installed in your Python directory. If you don’t know where that is, type in the following command in PowerShell:

py -c "import os, sys; print(os.path.dirname(sys.executable))"

The output should give you the path. Change to that directory, and type in:

.\PyMOL.exe

In an ideal world, you now have installed Open Source PyMOL and can enjoy all plugins+scripts out there.

Author