This is a read-only mirror of

Difference between revisions of "MAC Install"

From PyMOL Wiki
Jump to navigation Jump to search
Line 125: Line 125:
2. Make a symbolic link to your fink site-packages directory:
2. Make a symbolic link to your fink site-packages directory:
  sudo ln -s /Library/Frameworks/Python.framework/Versions/Current/lib/python2.4/site-packages /sw/lib/python2.4/site-packages
  sudo ln -s /sw/lib/python2.4/site-packages /Library/Frameworks/Python.framework/Versions/Current/lib/python2.4/site-packages  
This enables your new framework python to use all of the extras, like pmw, that you installed as dependencies for pymol.
This enables your new framework python to use all of the extras, like pmw, that you installed as dependencies for pymol.

Revision as of 15:37, 5 April 2007

Installing MacPyMOL


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.

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

I (Bill Scott) wrote a cheezy pymol shell script (and zsh function) to invoke this on the command line. It uses mdfind to find the executable. I also use this ~/.pymolrc file.

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.

Mighty Mouse

A 3-button mouse is essential. Apple's Mighty Mouse is an extra treat.

PowerMate Dial

The PowerMate dial works nicely with pymol.


The latest Macs finally support stereo in a window. There is more information in the Monitors Hardware Options section.

Installing X-windows based pymol on Mac OS X

Why would you want to do this?

  1. You want to run a free, guilt-free, open-source version of pymol
  2. You just happen to prefer the tkinter menu
  3. You want to use plugins, for example, the apbs plugin for free grasp-like electrostatic calculations.

Simplest Installation

Install pymol with Fink

By far the simplest way to install the X-windows based version of pymol on OS X is by using the fink package management system. To compile it, all you need to do is issue the command

fink install pymol-py24

(This will install python2.4 in fink, along with an X-windows based tkinter. There are also versions that permit you to install pymol to interact with python2.3 and even python2.2. Fink uses its own unix-type python installation, but you can trick pymol into using the aqua framework to get a prettier GUI after the fact.)

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

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:

export DISPLAY=":0.0"

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.

Install APBS and friends with fink

APBS calculated electrostatic potential of SARS s2m RNA reveals the colors of a true patriot.

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. Here is a big screenshot of the fink APBS package being invoked via the pymol plugin.

Nucleic acids may prove problematic for the apbs plugin. If so, use the pdb2pqr command-line tool to create a pqr file manually, instead of using the plugin to generate it.

Gratuitous Eye-Candy Tweaks


You can get the fink installed X-windows based pymol-py24 to use an aqua-based tkinter menu as follows:

Install a Framework build of Python2.4

as follows:

mkdir src
cd src
curl -O
tar xvfz Python-2.4.2.tgz
cd Python-2.4.2
export PATH=/usr/bin:$PATH
./configure --enable-framework
sudo make frameworkinstall

Getting Fink's PyMOL to use a Framework build of Python

1. Remove the following empty directory by issuing the command

sudo rmdir /Library/Frameworks/Python.framework/Versions/Current/lib/python2.4/site-packages

2. Make a symbolic link to your fink site-packages directory:

sudo ln -s /sw/lib/python2.4/site-packages /Library/Frameworks/Python.framework/Versions/Current/lib/python2.4/site-packages 

This enables your new framework python to use all of the extras, like pmw, that you installed as dependencies for pymol.

3. Edit the file /sw/bin/python, and change the line

/sw/bin/python2.4 $PYMOL_PATH/modules/pymol/ "$@"


/Library/Frameworks/Python.framework/Versions/Current/bin/python2.4  $PYMOL_PATH/modules/pymol/ "$@"

4. Now issue


and you should see something that looks like this full-size screenshot of pymol with an aqua-tkinter pmw GUI and X-windows based molecular display window. Also shown in this screenshot is the APBS plugin in action.


MacPyMOL for Tiger now includes a hybrid X11 mode. Assuming that X11 is already installed, simply duplicate and rename it "" and launch.

Doing this creates the inverse situation of the previous tweak; the molecular viewer window is aqua-based and the tkinter GUI is X11 based. (Naturally, I had to try the trick of making an aqua-tkinter GUI. It sort of works, but the GUI is dead, thanks to a threading bug in the aqua Tcl/Tk framework that comes with Apple. Bummer.)