This is a quick “how to” post. There is a licensed version of PyMol (MacPyMol) available, but the open source version can be installed on a Mac free of charge. The official page has a guide, which is not terribly detailed, and I found this excellent guide which is unfortunately out-of-date.
Here is an updated guide to installing PyMol using Homebrew on macOS Mojave 10.14.3
Step 1 is to install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Next step is to install the PyMol dependencies using Homebrew
brew install Caskroom/cask/xquartz
brew install tcl-tk
brew install python
Now install PyMol.
brew install brewsci/bio/pymol
You can now run PyMol by typing
pymol
The MPIBR-Bioinformatics page has the following guide to make a little executable app to launch PyMol straight from the Desktop.
- Open Automator, which is in Applications in macOS.
- Create new document, select “Application”.
- Select “Actions” and “Library” in the left pane. Select “Utilities” and “Run Shell Script”. Drag this into the main pane.
- Choose “/bin/bash” as a shell.
- Paste the following:
/usr/local/bin/pymol -M
. If this doesn’t work, check the path to pymol usingwhich pymol
in the terminal, and use this instead. - Save the application (“File > Save”) to the Desktop and name it “PyMol”.
Now you can double-click this app to run PyMol.
Hi,
Just installed PyMOL the way you specified, however because tcl-tk is built without x11 support, all legacy plugins running on PyMOL won’t work. Do you have any workaround?
Sorry no. My previous PyMOL install ran with X11, but this was quite outdated hence doing this new install.
Thank you so much for this, I tried to install pymol directly from SourceForge and had many conflicts with X11 versions, this solved all my problems.
Awesome share. Thanks a heap
HI, I’m following the steps and when try brew pymol it’s failed, show this notif
A full installation of Xcode.app is required to compile
this software. Installing just the Command Line Tools is not sufficient.
any suggestion?
thanks alot
I’m using 10.11 el capitan mac.
Sorry, I don’t know. It sounds like you need to install Xcode via the App Store.
Hi, how can I install PyMOL 1,8 instead of the latest version?
Hi everyone. I am on High Sierra and trying to install Pymol.
HAs anyone out there has done this or has suggestions for installation?
Thanks a lot!
If you couldn’t install it using the steps in this post, you could try the method in the guide I linked to (https://github.molgen.mpg.de/MPIBR-Bioinformatics/pymol-install).
I follow the guide provided above but my installation of ‘brew install brewsci/bio/pymol’ keeps stopping at the following line
==> python3 setup.py install –install-scripts=/usr/local/Cellar/pymol/2.3.0/libexec/bin –install-lib=/usr/local/Cell
and then nothing happens for hours. Is something wrong? And how do i fix it!?
Sorry, I don’t know. Is python3 installed? Quick way to check is to type `which python3` in the terminal.
I have just checked. I get the following output:
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
OK. I don’t know, sorry!
I am also having this problem. Have you found a solution? Thanks!
Unfortunately no. I gave up in the end. Sorry for the late respond.
I just successfully installed this on OS 10.15 – catalina
Thanks so much, you are a lifesaver! I managed to instal it on my Mac running Catalina without much difficulty.
The only small issue is that after the first command I got this message from terminal:
Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in Bash. Please migrate to the following command:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
So I used the recommended command and completed the installation with the other commands in your guide.
Hi Sergio, thanks for the comment and the info. Great to know that this still (kind of) works on Catalina.
How did you manage to install it?
Great post, Thanks!. I just set this up. I wanted to be able to select this “pseudo-application” as the default option for PDBs (i.e. the “Open with” default) so that I could click on a PDB file and it would open the OpenSOurce PyMOL and load the PDB.
I achieved this by modifying your script a bit. Change the “pass input” option to arguments, then change the script to include the additional option: /usr/local/bin/pymol -M “$@”
Now, when I click on a pdb file, it opens it in OpenSource Pymol
Nice! Great tip, thanks!
I am having problems installing PyMOL on my mac with the commands in Homebrew provided above. I am running MacOS Catalina. Anybody experiencing similar problems?
How can I get free PyMoL for my Mac for non-commercial users?
The steps in this article will get PyMol on your Mac for free.
I just wanted to comment on a few things to check if the above guide does not work for you. Firstly, the latest PyMOL (2.5.0 at the time of writing) runs on macOS Big Sur 11.6.1. However, I have run into some problems after doing some brew updates. In one case this lead to PyMOL launching but then crashing and in the other, PyMOL launched but was missing the menu bar.
So two things to check: is XCode installed on your system? I haven’t been able to confirm but I suspect it is needed. Second, if you get errors when PyMOL launches and/or it prints that “Qt not available, using … interface”. Then a fix I found works was to `pip3 install PySide2`. This installed PySide2-5.15.2 shiboken2-5.15.2 on my system and allowed successful launch of PyMOL.
As an addendum to the above, I found that saving images was not possible and that this could be fixed by `pip3 install PyQt5`.