Changes between Initial Version and Version 1 of InstallNotesMavericks


Ignore:
Timestamp:
May 21, 2014 10:43:06 PM (8 years ago)
Author:
toby
Comment:

no figures yet

Legend:

Unmodified
Added
Removed
Modified
  • InstallNotesMavericks

    v1 v1  
     1= Installing GSAS-II with 64-bit Canopy Python on Mac OS X 10.9.3 =
     2
     3Until 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 [https://www.enthought.com/downloads/ 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.
     4
     5Note 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).
     6
     7== 1. Load subversion (svn) ==
     8
     9Open a terminal window (in Finder navigate through !Applications/Utilities/Terminal) type svn in that window.
     10 
     11
     12The response is an error (as above), but the following dialog box also pops up:
     13
     14 [[Image()]]
     15
     16Click 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.
     17
     18The install takes a few minutes.
     19
     20Confirm that svn was installed. This time when svn is typed in the terminal, the response is "Type 'svn help' for usage," as below.
     21 
     22
     23== 2. Download and Install 64-bit Canopy Express for Mac OS X ==
     24
     25Note that you will need to have an administrator password below.
     26
     27Open URL https://www.enthought.com/downloads/ and select the latest version of 64-bit Canopy Express (Basic and Professional are fine two if you would like to support Enthought). (In this case, I downloaded version 1.4.0, but I hear 1.4.1 should be out soon.)
     28
     29You 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.
     30 
     31
     32Note 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.
     33
     34Once 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:
     35
     36 
     37Instead, use control-click on the file (right-clicking with a two or three button mouse works too), which brings up the following menu:
     38
     39.   
     40
     41Select open, which brings up the following warning message:
     42
     43 
     44
     45After 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:
     46 
     47
     48The default answer here is fine, (but in retrospect, I probably would have changed this to /Users/<user>/Applications/Canopy_64bit as my own preference.)
     49
     50The 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.
     51
     52 
     53
     54== 3. Test that Enthought python starts ==
     55
     56Note 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.
     57
     58{{{
     59localhost:~ toby$ python
     60Python 2.7.5 (default, Aug 25 2013, 00:04:04)
     61[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
     62Type "help", "copyright", "credits" or "license" for more information.
     63>>> ^D
     64}}}
     65
     66After installing Canopy with the “Yes” option above and starting new terminal (so that the new definitions take effect, the startup messages change:
     67
     68{{{
     69localhost:~ toby$ python
     70Enthought Canopy Python 2.7.6 | 64-bit | (default, Apr 11 2014, 11:55:30)
     71[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
     72Type "help", "copyright", "credits" or "license" for more information.
     73>>>
     74}}}
     75
     76If 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. 
     77
     78{{{
     79localhost:~ toby$ /Users/toby/Library/Enthought/Canopy_64bit/User/bin/python
     80Enthought Canopy Python 2.7.6 | 64-bit | (default, Apr 11 2014, 11:55:30)
     81[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
     82Type "help", "copyright", "credits" or "license" for more information.
     83>>> exit()
     84}}}
     85
     86== 4. Install GSAS-II ==
     87
     88Make 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.
     89
     90
     91{{{
     92localhost:~ toby$ mkdir G2
     93localhost:~ toby$ cd G2/
     94localhost:G2 toby$ curl https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py > bootstrap.py
     95  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
     96                                 Dload  Upload   Total   Spent    Left  Speed
     97100  3735  100  3735    0     0   4790      0 --:--:-- --:--:-- --:--:--  4788
     98localhost:G2 toby$
     99}}}
     100
     101Use 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:
     102
     103{{{
     104localhost:G2 toby$ /Users/toby/Library/Enthought/Canopy_64bit/User/bin/python bootstrap.py
     105**********************************************************************
     106Checking python packages... Checking for subversion...  found svn in /usr/bin/svn
     107OK
     108GSAS-II is being bootstrapped from repository
     109        https://subversion.xray.aps.anl.gov/pyGSAS/
     110to /Users/toby/G2
     111Determining system type... Mac OS X, Intel-compatible
     112**********************************************************************
     113loading GSAS-II from https://subversion.xray.aps.anl.gov/pyGSAS/trunk/
     114/usr/bin/svn co https://subversion.xray.aps.anl.gov/pyGSAS/trunk/ /Users/toby/G2 --non-interactive --trust-server-cert
     115}}}
     116(many lines listing downloaded files removed)
     117{{{
     118Checked out revision 1357.
     119Run of python app failed, resorting to non-app version of Python, Alas!
     120using pythonw for Canopy 1.4.0
     121
     122Removing old GSAS-II app (/Users/toby/G2/GSAS-II.app)
     123
     124Created GSAS-II app (/Users/toby/G2/GSAS-II.app).
     125Viewing app in Finder so you can drag it to the dock if, you wish.
     126localhost:G2 toby $
     127}}}