The download is about as straightforward as it gets, and you can install it wherever it makes you happy. You need a 3 button mouse (clickable scroll wheel = middle button). Apple has finally come to its senses and designed a proper, ergonomically pleasant, scrollbutton mouse that works well with pymol and permits horizontal scrolling. Most other mice will also work well.
MacPyMOL comes with a native OSX interface which doesn't require X11 (XQuartz). However, some features, like the Plugin menu, are only available in the X11 interface of PyMOL. There are two ways to launch the X11 interface:
- rename /Applications/MacPyMOL.app to /Applications/MacPyMOLX11Hybrid.app
- launch the unix executable with the -m flag: /Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL -m
Warning on Mouse Drivers
One word of warning: Do not install 3rd party drivers for multi-button mice if you can avoid it. These often mess with the mapping of the middle button or have other horrific side effects. Fortunately, with OS X, you should not need to.
Invoking pymol from the unix command line
The unix executable resides at MacPyMOL.app/Contents/MacOS/MacPyMOL
Additional invokation options and further details are discussed under Launching_PyMOL#MacOS_X:
You don't need any of these to use MacPyMOL. But you didn't really need a Mac either. Face it: You need these.
The trick to getting MacPyMOL to work in stereo on the second monitor is to force it to initially open on that display by providing an appropriate "-X #" (and perhaps -Y #) option on launch. That way the OpenGL context will be created with stereo support.
./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 ./MacPyMOL.app/Contents/MacOS/MacPyMOL -X -1000 -Y 100
Source: Warren DeLano; PyMOL Users Archive
PyMOL and Fink
Fink is a subsystem that was created to bring the full power of Linux open-source to the Darwin (Apple) platform. It is essentially a full working Linux system integrated with the Apple OS. Even X11 applications can be run. To use PyMOL with fink, you will first need to install fink. This usually takes a while, but is straightforward.
Once fink is installed, you have two options: (1) use the PyMOL package setup by wgscott, which might be old, but easier to install; or, download the PyMOL source and build. As usual, it comes down to ease of install vs. new features.
PyMOL Directly from Fink
To install PyMOL directly from fink, type:
fink install pymol-py27
This will install python2.7 in fink, along with an X-windows based tkinter. There are also versions that permit you to install PyMOL to interact with python2.6 and older (as of Mar-12-2013). Fink uses its own unix-type python installation. For other versions list up pymol packages using fink list pymol* on command line.
Notes and Possible Issues
- The fink pymol package currently exists in the unstable branch of fink, so you will either have to activate the unstable branch or make the following symbolic links:
sudo ln -s /sw/fink/dists/unstable/main/finkinfo/sci/pymol-py.* /sw/fink/dists/local/main/finkinfo/.
You might need to create the latter directory if it doesn't already exist, i.e., issue the command
sudo mkdir -p /sw/fink/dists/local/main/finkinfo
- 10.4 ONLY: Be sure to set your display environment in your start up shell script to use pymol. For example in your home directory, the .bashrc (or .bash_profile) file should contain:
Do NOT set the DISPLAY variable for 10.5+, as God does this for you automatically. If for some reason you don't want to set DISPLAY, launch X11 manually (Applications/Utilities) then start a login shell with 'xterm -ls' (note default xterm is not a login shell so will not read .bashrc) and finally issue 'pymol'
- Fink pymol also reads ~/.pymolrc in your home directory.
- I (wgscott) have put a whole lot of further information on how to use fink to install crystallographic software on my own wiki and website, including instructions on how to install precompiled binary packages using fink.
- The fink pymol package is currently maintained by Jack Howarth.
PyMOL Install from Source, Using Fink
If the above didn't work, or you really want the latest PyMOL code, then:
- Download the latest PyMOL source and unpack it.
- Ensure that you have installed, in Fink:
- python-2.5 pmw-py25
- mesa mesa-shlibs
- libpng3 libpng3-shlibs
- freetype2 freetype2-deve
- freeglut freeglut-shlibs
- Change directory into the new PyMOL dir, eg. cd pymol
- Then, install PyMOL with,
/sw/bin/python setup.py install
Notes and Possible Issues
- If you get an error about -Wno-long-double then your gcc is mismatched. I fixed this by pointing the symbolic link /usr/bin/gcc from /usr/bin/gcc-4.2 to /usr/bin/gcc-4.0. Or, in code,
# These command are commented out to stop people from copy/pasting b/c # these are possibly dangerous for your system. Ensure that /usr/bin/gcc # is a symbolic link and not a real binary. If so, I used the following # to fix the -Wno-long-double error. # sudo rm /usr/bin/gcc # sudo ln -s /usr/bin/gcc-4.0 /usr/bin/gcc
- If you get an error about something like GL_PALETTE_TEXTURE then you need to comment out those few lines in the code that throws the error. Read the output.
Install APBS with Fink
To use the electrostatics plugin, you will need APBS and its dependencies. These are also available as Fink packages, and include APBS, maloc and pdb2pqr. If you have multiple processors available, you might wish to install the MPI version of APBS.
Issuing the command
fink install apbs
will install apbs and its required dependencies for you. The fink pymol package is already preconfigured to do the right thing to use apbs as a plugin.
PyMOL in MacPorts
Recent versions of MacPorts include a hybrid PyMOL. It can be installed with:
sudo port install pymol
Make sure that the Tk and Tcl packages are installed with the required flags:
sudo port -f uninstall tcl sudo port -f uninstall tk sudo port install tcl -corefoundation sudo port install tk -quartz
- When selecting atoms with the mouse, no matter how well one aims, the atoms selected are actually those far from the ones wanted
- This is a known problem. Select "Millions of Colors" in System Preferences->Display.
- There seems to be a race condition between the Tk window and the openGL window. (The focus for the windows are very quickly flashing back and forth.)
- This is a well-known problem. The blame here is circular: Apple blames developers, developers blame Apple. Regardless, it appears to have been fixed with the latest Mac OS X (10.6) release. Upgrade to 10.6 and this problem goes away.
- When using multiple displays, the OpenGL window flickers; moving the window between displays crashes the whole session 
- If you don't need stereo then start PyMOL in mono mode with
pymol -MIf you need stereo then you probably need to wait for a fix in the graphics driver.
Installing PyMOL with Homebrew
1. Install homebrew.
At a Terminal prompt, copy and paste the following command and follow the on-screen instructions.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You will be prompted to install the the Xcode Command Line Tools if you don't already have them. After installation finishes, it is probably a good idea to run
to make sure there are no issues with your setup.
2. Install Xquartz.
brew install caskroom/cask/brew-cask brew cask install xquartz
3. Install PyMOL.
brew install homebrew/science/pymol
You should now have a working PyMOL installation, and be able to launch the program in a Terminal window from any directory with the command
If you get this error
Traceback (most recent call last): File "/usr/local/Cellar/pymol/188.8.131.52/libexec/lib/python2.7/site-packages/pymol/__init__.py", line 71, in <module> import pymol File "/usr/local/Cellar/pymol/184.108.40.206/libexec/lib/python2.7/site-packages/pymol/__init__.py", line 533, in <module> import pymol._cmd ImportError: dlopen(/usr/local/Cellar/pymol/220.127.116.11/libexec/lib/python2.7/site-packages/pymol/_cmd.so, 2): Library not loaded: /usr/local/lib/libGLEW.1.11.0.dylib Referenced from: /usr/local/Cellar/pymol/18.104.22.168/libexec/lib/python2.7/site-packages/pymol/_cmd.so Reason: image not found
You could try this, linking another libGLEW library to the one who is asked for
ln -s /usr/local/lib/libGLEW.1.12.0.dylib /usr/local/lib/libGLEW.1.11.0.dylib
Some older Macs seem to crash with stereo graphics. If this happens to you, a workaround is to launch PyMOL explicitly in Mono mode with `pymol -M`. You can also set up an alias in your ~/.profile:
alias pymol='pymol -M'
With previously brew-installed python or tcl/tk
Brewed PyMOL requires python compiled with the --with-tcl-tk option and tcl-tk compiled with the --with-threads and --with-x11 options. If you've already brew-installed either of these packages without these options, you'll have to uninstall and reinstall them as follows, then proceed to install PyMOL (assuming you've already either attempted to `brew install homebrew/science/pymol` or run `brew tap homebrew/science`).
brew update # just to keep things current brew uninstall python brew uninstall tcl-tk brew install tcl-tk --with-threads --with-x11 brew install python --with-tcl-tk brew install pymol
Exporting MPG movies
See MovieSchool 6 for freemol installation.