Version 7 (modified by toby, 8 years ago) (diff)


Installing GSAS-II with 64-bit Canopy Python on Mac OS X 10.9.3

A new single-step installer has been developed for GSAS-II on Macs. Please try this first using the instructions here? and report any problems.

Until recently, wxPython (the GUI package needed by GSAS-II) was only compatible on the Mac (OS X) with 32-bit Python. This changed with version 2.9 of wxPython. This can be obtained as part of the 64-bit Enthought Canopy package. There are two significant advantages of use of a 64-bit Python interpreter: it allows for larger projects and it is supposed to be faster (we have not noticed much difference). There are two disadvantages: GSAS-II has not fully been debugged with wxPython 2.9 and at present the app created using the Canopy install does not have all the Mac flourishes working properly (wrong Icon, wrong app name). I have heard of problems with installing the old EPD version of Python for OS X 10.9 (Mavericks), so until I check that out, here is how to install GSAS-II for 10.9. My guess is that 10.8 will work quite similarly.

Note that you will need to have an administrator password at one point, but you are encouraged to do this installation from a regular account (you should never use a web browser or e-mail client from admin, IMHO).

1. Load subversion (svn)

Open a terminal window (in Finder navigate through Applications/Utilities/Terminal) type svn in that window.

type svn command in terminal

The response is an error (as above), but the following dialog box also pops up:

message to install svn

Click on “Install” in the dialog window pops up saying the svn command requires the command-line developer tools. Would you like to install the tools now? Press Install.

The install takes a few minutes.

Confirm that svn was installed. This time when svn is typed in the terminal, the response is "Type 'svn help' for usage," as below. confirm svn is installed

2. Download and Install 64-bit Canopy Express for Mac OS X

Note that you will need to have an administrator password below.

Open URL and select the latest version of 64-bit Canopy Express (Basic and Professional are fine too if you would like to support Enthought). (Here, I downloaded version 1.4.0, but I hear 1.4.1 should be out soon.)

You will download a .dmg file. You may need to click on that file to mount it, depending on which web browser you use and its settings. This opens the window below.

Canopy install dialog

Note that this is suggesting that you install Canopy in the main system Applications folder. I tried to avoid that (to see if I could avoid use of admin privileges – but no luck as will be seen later) by putting the Canopy folder in ~/Applications/Users/<user>/Applications). If doing this again, I’d probably just drag it to the system folder.

Once the files are copied, you probably cannot double-click on the new folder (contrary to install docs from Enthought), because the following error occurs:

Error from initial double-click on Canopy

Instead, use control-click on the file (right-clicking with a two or three button mouse works too), which brings up the following menu:

control-click menu

Select open, which brings up the following warning message:

first use warning

After clicking on Open, you will be asked to authenticate as an admin-level user. Once that is done, the Canopy setup application will open two dialog windows. The first asks where your personal Python setup will be placed: Canopy config window

The default answer here is fine, (but in retrospect, I probably would have changed this to /Users/<user>/Applications/Canopy_64bit as my own preference.)

The second dialog box asks if this should be installed as the default on your system. You can use either answer here, but if you say “No” a bit more work is needed in the next step.

Canopy installation choice dialog

3. Test that Enthought python starts

Note your Mac does come with Python installed (but does not include all the nice packages that GSAS-II needs). The system version of Python produces this message when run (in a terminal window). Press Control-D or type “exit()” to exit.

localhost:~ toby$ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D

After installing Canopy with the “Yes” option above and starting new terminal (so that the new definitions take effect, the startup messages change:

localhost:~ toby$ python
Enthought Canopy Python 2.7.6 | 64-bit | (default, Apr 11 2014, 11:55:30) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

If you selected “No” to making Canopy the default, you need to run Python using the full path, which will be the location you used in the previous dialog with /User/bin/python added at the end.

localhost:~ toby$ /Users/toby/Library/Enthought/Canopy_64bit/User/bin/python
Enthought Canopy Python 2.7.6 | 64-bit | (default, Apr 11 2014, 11:55:30) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

4. Install GSAS-II

Make a new directory for where you will install GSAS-II and download the file to that location. This can be done with Finder and a browser or from a Terminal window. Be sure to place the file in an empty directory, because that will be where all GSAS-II files will be placed. The file can be downloaded from the command-line with this: curl > or from a browser with this link

localhost:~ toby$ mkdir G2
localhost:~ toby$ cd G2/
localhost:G2 toby$ curl >
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3735  100  3735    0     0   4790      0 --:--:-- --:--:-- --:--:--  4788
localhost:G2 toby$ 

Use the Canopy Python to run the downloaded file. You must do this from a terminal because the file must be run directly from Python, not from Canopy (which is what happens if you double-click on it in Finder.) Below, find typical output from this process:

localhost:G2 toby$ /Users/toby/Library/Enthought/Canopy_64bit/User/bin/python 
Checking python packages... Checking for subversion...  found svn in /usr/bin/svn
GSAS-II is being bootstrapped from repository 
to /Users/toby/G2
Determining system type... Mac OS X, Intel-compatible
loading GSAS-II from
/usr/bin/svn co /Users/toby/G2 --non-interactive --trust-server-cert

(many lines listing downloaded files removed)

Checked out revision 1357.
Run of python app failed, resorting to non-app version of Python, Alas!
using pythonw for Canopy 1.4.0

Removing old GSAS-II app (/Users/toby/G2/

Created GSAS-II app (/Users/toby/G2/
Viewing app in Finder so you can drag it to the dock if, you wish.
localhost:G2 toby $

Attachments (9)

Download all attachments as: .zip