Commit 42dee837 authored by Jon Pye's avatar Jon Pye
Browse files

Commit after changing instructions to use Conda

parent ffebef04
......@@ -22,77 +22,40 @@ Python, cartopy, and owslib are needed. Below we will create a Python virtual en
*1) Getting Python:*
link: https://www.python.org/download/releases/2.7/
We'll be using Anaconda for this as it pre-installs a lot of the things we'll need. We'll still have to upgrade a few packages afterward.
Follow instructions for your OS/platform
link: https://store.continuum.io/cshop/anaconda/
Windows users may have to add python to their PATH variable
Quickstart guide: https://store.continuum.io/static/img/Anaconda-Quickstart.pdf
A good Windows tutorial to get Python, Pip and virtualenv working can be found here:
http://docs.python-guide.org/en/latest/starting/install/win/
*2) Now we can use pip to install (most of) the rest of our requirements*
If you follow this guide, skip ahead to step 4) when you're done.
*2) Installing Setuptools and the python package manager pip:*
Setuptools: link: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
save this file locally and then run:
#> python ez_setup.py
Pip:
howto: https://pip.pypa.io/en/latest/installing.html
link: https://bootstrap.pypa.io/get-pip.py
run get-pip.py like you did with ez_setup.py
#> python get-pip.py
*3) Now we can install python packages on the command line through pip.*
In a command-line window (Windows **cmd** or OSX/Linux **Terminal** ), type:
#> pip install virtualenv
*4) Now make a virtual environment somewhere (in your home folder, perhaps):*
#> cd place/to/put/my/python/virtualenvs
#> virtualenv carto-demo
And activate this virtual python environment
Windows:
#> pip install owslib
#> pip install shapely --upgrade
#> pip install pyshp
#> pip install geojson
#> carto-demo/Scripts/activate.bat
Mac/Linux:
*3) Installing Cartopy:*
#> source carto-demo/bin/activate
Getting Git:
*5) Now we can use pip to install (most of) the rest of our requirements*
Your OS might not have git pre-installed. Download git from http://git-scm.com/download/ and install it. Select Use git from the Command Window when installing to Windows to let you use Git from the command line.
Windows users may need a compiler, try Visual Studio at this link:
http://download.microsoft.com/download/A/5/4/A54BADB6-9C3F-478D-8657-93B3FC9FE62D/vcsetup.exe
Mac and Linux:
pip will install prerequisites, so this is the most painless way to do things
Installing packages from Git:
#> pip install matplotlib
#> pip install owslib
#> pip install shapely
#> pip install pillow
#> pip install pyshp
#> pip install cython
#> pip install pyproj
#> pip install git+git://github.com/SciTools/cartopy.git
Windows Users:
You'll have to download the Cartopy binaries from the Python Extension Packages site:
*5a) You may also need to install GDAL (to get PROJ and GEOS), follow these instructions*
link: http://www.lfd.uci.edu/~gohlke/pythonlibs/ search for cartopy, download the exe for py2.7
*for Windows:*
http://trac.osgeo.org/osgeo4w/
*Mac users:*
If you use Homebrew, you can install these libraries on the command line:
......@@ -106,23 +69,15 @@ or download KyngChaos' GDAL Complete Frameworks .dmg
http://www.kyngchaos.com/software/frameworks#gdal_complete
CartoPy is not in pip's library, we'll have to install it manually
*6) Install python module cartopy:*
howto: http://scitools.org.uk/cartopy/docs/latest/installing.html#installing
link: https://github.com/SciTools/cartopy/archive/master.zip
#> unzip master.zip
#> cd cartopy-master
#> python setup.py install
*4) Download the examples from the GitLab repo:*
link: https://utility.oceantrack.org/gitlab/jdpye/otn-python-visualization/repository/archive.zip
*7) Download the example from the GitLab repo:*
unzip into a working directory.
https://utility.oceantrack.org/gitlab/jdpye/otn-python-visualization/repository/archive.zip
Call the script with
#> python owslib_example.py
### Using the OSGeo Live Virtual Machine:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment