This is being written by Jared Kibele in early January, 2018. We are working on getting Rachel Carlson’s laptop set up for scientific and geospatial Python work. Hopefully this will serve as a guide for the next time we need to put together a similar setup.
In general, we’re following the recommendations of The Hitchhiker’s Guide to Python, with the exception that we’re focusing on Python 2.7 rather than 3. We’re going to need to get with the Python 3 program soon, but not quite yet.
Homebrew was installed according to the Hitchhiker’s instructions
We opted for the full Xcode install from the app store rather than the other two options
’’~/.profile’’ didn’t exist so we created the file (using ‘‘nano ~/.profile’’) and put in the ‘‘export PATH=/usr/local/bin:/usr/local/sbin:$PATH’’ line.
Aside from that, the instructions on that page worked out okay.
We ignored the stuff about virtual environments for now.
Numpy, Matplotlib, Scipy, and Pandas are pretty essential, and Spyder is my favorite IDE. There are some good instructions for installing that stuff here . We followed most of those instructions with the following exceptions:
Do not install Homebrew. It was installed earlier (in the previous “Python” section)
Do not install gcc. We installed Xcode earlier
sympy is optional at this point.
Spyder is currently causing problems but running Spyder from the source code on Git appears to work. More below
'’brew install –with-python pyqt5’’ seemed to work fine, but ‘‘pip2 install -U spyder’’ failed saying it couldn’t find a pyqt installation. I’m trying to figure out what the problem is at the moment. I’ll update this entry when I get it figured out. …or I may lose my mind while trying.
Maybe we missed this line for Rachel’s install? ‘‘xcode-select –install’’
We successfully installed Spyder using this dmg, but this installation had a few problems: it did not support the iPython console for Python 2.7 and we were unable to import geopandas.
We instead used the procedure below to run Spyder 4 from source code.
‘‘cd /your/spyder/git-clone’’
‘‘python bootstrap.py’’
We had to install a number of dependencies for this to work properly: chardet, qtpy, psutil, qtawesome, cloudpickle, docutils, sphynx, pyflakes, pycodestyle, rope, jedi, pylint
April 2018. Jeanette had some trouble with Spyder installation following these instructions. She said this link sorted her out: http://engineeringterminal.com/computer-science/tutorials/scipy-setup-macos.html