Installing PySAL for OSGeo4W
Update 2017: Please follow the instructions on the OSGeo4W website: https://trac.osgeo.org/osgeo4w/wiki/ExternalPythonPackages
Update 2015: I now recommend this workflow based on Nathan’s post on installing Python setup tools:
- Download ez_setup.py
- Run
python ez_setup.py
in your OSGeo4W shell - Run
easy_install pysal
in your OSGeo4W shell
Original post:
Today’s post is a summary of how to install PySAL on Windows for OSGeo4W Python.
The most important resource was https://trac.osgeo.org/osgeo4w/wiki/ExternalPythonPackages
In the OSGeo4W Shell run:
C:\Users\anita_000\Desktop>curl http://python-distribute.org/distribute_setup.py | python
Update: Note that python-distribute.org has gone down since I posted this. See http://www.gossamer-threads.com/lists/python/python/1158958 for more info.
Then download https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py to the Desktop and run:
C:\Users\anita_000\Desktop>python get-pip.py
When pip is ready, install PySAL:
C:\Users\anita_000\Desktop>pip install pysal
Test the installation:
C:\Users\anita_000\Desktop>python Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import pysal
Note to self: Check instructions from https://pip.pypa.io/en/latest/installing.html#pip-included-with-python