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.
The response is an error (as above), but the following dialog box also pops up:
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.
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 https://www.enthought.com/downloads/ 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.
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 canopy.app folder (contrary to install docs from Enthought), because the following error occurs:
Instead, use control-click on the file (right-clicking with a two or three button mouse works too), which brings up the following menu:
Select open, which brings up the following warning message:
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:
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.
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 https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py file to that location. This can be done with Finder and a browser or from a Terminal window. Be sure to place the bootstrap.py 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 https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py > bootstrap.py or from a browser with this link https://subversion.xray.aps.anl.gov/trac/pyGSAS/browser/install/bootstrap.py?format=txt
localhost:~ toby$ mkdir G2 localhost:~ toby$ cd G2/ localhost:G2 toby$ curl https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py > bootstrap.py % 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 bootstrap.py file. You must do this from a terminal because the bootstrap.py 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 bootstrap.py ********************************************************************** Checking python packages... Checking for subversion... found svn in /usr/bin/svn OK GSAS-II is being bootstrapped from repository https://subversion.xray.aps.anl.gov/pyGSAS/ to /Users/toby/G2 Determining system type... Mac OS X, Intel-compatible ********************************************************************** loading GSAS-II from https://subversion.xray.aps.anl.gov/pyGSAS/trunk/ /usr/bin/svn co https://subversion.xray.aps.anl.gov/pyGSAS/trunk/ /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/GSAS-II.app) Created GSAS-II app (/Users/toby/G2/GSAS-II.app). Viewing app in Finder so you can drag it to the dock if, you wish. localhost:G2 toby $
Attachments (9)
-
mac1.png
(104.0 KB) -
added by toby 10 years ago.
type svn command in terminal
-
mac2.png
(138.6 KB) -
added by toby 10 years ago.
message to install svn
-
mac3.png
(153.0 KB) -
added by toby 10 years ago.
confirm svn is installed
-
mac4a.jpg
(115.1 KB) -
added by toby 10 years ago.
Canopy install dialog
-
mac5.png
(58.7 KB) -
added by toby 10 years ago.
control-click menu
-
mac6.png
(130.2 KB) -
added by toby 10 years ago.
first use warning
-
mac7.png
(81.6 KB) -
added by toby 10 years ago.
Canopy config window
-
mac8.png
(112.7 KB) -
added by toby 10 years ago.
Canopy installation choice dialog
-
mac4.png
(133.9 KB) -
added by toby 10 years ago.
Error from initial double-click on Canopy
Download all attachments as: .zip