Skip to content

Commit 7ca4138

Browse files
authored
Merge pull request SciTools#1480 from MarkWieczorek/install_update_2
Update installation instructions (v2-rebase)
2 parents 18db70a + 8e4f721 commit 7ca4138

File tree

1 file changed

+54
-41
lines changed

1 file changed

+54
-41
lines changed

INSTALL

Lines changed: 54 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
Installing Cartopy
22
==================
33

4-
Pre-built binaries
5-
------------------
4+
Conda pre-built binaries
5+
------------------------
66

7-
The easiest route to installing cartopy is through
8-
`Conda <https://conda.io/miniconda.html>`_. For all platforms
9-
installing cartopy can be done with::
7+
The easiest way to install Cartopy is by using
8+
`Conda <https://conda.io/miniconda.html>`_. If conda is already installed,
9+
installation is as easy as::
1010

1111
conda install -c conda-forge cartopy
1212

13-
Additional options include:
14-
* `Enthought Canopy <https://www.enthought.com/product/canopy/>`_.
13+
14+
Other pre-built binaries
15+
------------------------
16+
17+
Additional pre-built binaries can be found at a variety of sources, including:
1518
* Christoph Gohlke (https://www.lfd.uci.edu/~gohlke/pythonlibs/)
1619
maintains unofficial Windows binaries of cartopy.
1720
* `OSGeo Live <https://live.osgeo.org>`_.
@@ -20,41 +23,51 @@ Additional options include:
2023
Building from source
2124
--------------------
2225

23-
The latest release of Cartopy is available from
24-
https://github.com/SciTools/Cartopy.
26+
Before building Cartopy from source, you need to **first** install the
27+
required dependencies listed below. Once these are installed, Cartopy can be
28+
installed using the pip installer::
2529

26-
Once you have satisfied the requirements detailed below, simply run::
30+
pip install cartopy
2731

28-
python setup.py install
32+
To instead install the most recent version found on the GitHub master branch,
33+
use::
2934

30-
For non-standard locations, additional build lib & include paths
31-
can be provided as per-usual at build_ext phase::
35+
pip install git+https://github.com/SciTools/cartopy.git
3236

33-
python setup.py build_ext -I/path/to/include -L/path/to/lib
34-
python setup.py install
37+
Alternatively, you can clone the git repo on your computer and install manually
38+
using the `setup.py` file::
3539

40+
git clone https://github.com/SciTools/cartopy.git
41+
cd cartopy
42+
# Uncomment the following to specify non-standard include and library paths
43+
# python setup.py build_ext -I/path/to/include -L/path/to/lib
44+
python setup.py install
3645

37-
Requirements
38-
~~~~~~~~~~~~
39-
These external packages are required to install Cartopy or gain access to
40-
significant Cartopy functionality.
4146

42-
Many of these packages are available in Linux package managers
43-
such as aptitude and yum. For example, it may be possible to install
44-
Numpy using::
47+
Required dependencies
48+
~~~~~~~~~~~~~~~~~~~~~
49+
In order to install Cartopy, or to access its basic functionality, it will be
50+
necessary to first install **GEOS**, **NumPy**, **Cython**, **Shapely**,
51+
**pyshp** and **six**. Many of these packages can be installed using pip or
52+
other package managers such as apt-get (Linux) and brew (macOS). Many of these
53+
dependencies are built as part of Cartopy's conda distribution, and the recipes
54+
for these packages can be found at https://github.com/conda-forge/feedstocks.
4555

46-
apt-get install python-numpy
56+
For macOS, the required dependencies can be installed in the following way::
4757

48-
If you are installing dependencies with a package manager on Linux,
49-
you may need to install the development packages (look for a "-dev"
50-
suffix) in addition to the core packages.
58+
brew install proj geos
59+
pip3 install --upgrade cython numpy pyshp six
60+
# shapely needs to be built from source to link to geos. If it is already
61+
# installed, uninstall it by: pip3 uninstall shapely
62+
pip3 install shapely --no-binary shapely
5163

52-
Many of these dependencies are built as part of Cartopy's conda distribution.
53-
The recipes for these can be found at https://github.com/conda-forge/feedstocks.
64+
If you are installing dependencies with a package manager on Linux, you may
65+
need to install the development packages (look for a "-dev" or "-devel" suffix) in addition
66+
to the core packages.
5467

68+
Further information about the required dependencies can be found here:
5569

5670
**Python** 2.7 or later (https://www.python.org/)
57-
Cartopy requires Python 2.7 or later.
5871

5972
**Cython** 0.28 or later (https://pypi.python.org/pypi/Cython/)
6073

@@ -79,39 +92,39 @@ The recipes for these can be found at https://github.com/conda-forge/feedstocks.
7992
**six** 1.3.0 or later (https://pypi.python.org/pypi/six)
8093
Python 2 and 3 compatibility.
8194

82-
8395
Optional Dependencies
8496
~~~~~~~~~~~~~~~~~~~~~
85-
These are optional packages which you may want to install to enable
86-
additional Cartopy functionality.
97+
To make the most of Cartopy by enabling additional functionality, you may want
98+
to install these optional dependencies.
8799

88100
**Matplotlib** 1.5.1 or later (https://matplotlib.org/)
89-
Python package for 2D plotting. This package is required for any
90-
graphical capability.
101+
Python package for 2D plotting. Python package required for any
102+
graphical capabilities.
91103

92104
**GDAL** version 1.10.0 (https://gdal.org/)
93105
GDAL is a translator library for raster and vector geospatial data formats,
94106
which has powerful data transformation and processing capabilities.
95107

96108
**Pillow** 1.7.8 or later (https://pypi.python.org/pypi/Pillow/2.3.0)
97-
Popular fork of PythonImagingLibrary.
109+
A popular fork of PythonImagingLibrary.
98110

99111
**pyepsg** 0.4.0 or later (https://github.com/rhattersley/pyepsg)
100112
A simple Python interface to https://epsg.io
101113

102114
**pykdtree** 1.2.2 or later (https://github.com/storpipfugl/pykdtree)
103-
Fast kd-tree implementation in Python; used for faster warping of images in
104-
preference to SciPy.
115+
A fast kd-tree implementation that is used for faster warping
116+
of images than SciPy.
105117

106118
**SciPy** 0.10 or later (https://www.scipy.org/)
107-
Python package for scientific computing.
119+
A Python package for scientific computing.
108120

109121
**OWSLib** 0.8.7 (https://pypi.python.org/pypi/OWSLib)
110-
Python package for client programming with Open Geospatial Consortium
111-
(OGC) web service. Gives access to cartopy ogc clients.
122+
A Python package for client programming with the Open Geospatial
123+
Consortium (OGC) web service, and which gives access to Cartopy ogc
124+
clients.
112125

113126
**Fiona** 1.0 or later (https://github.com/Toblerity/Fiona)
114-
Python package for reading shapefiles faster than the default (pyshp).
127+
A Python package for reading shapefiles that is faster than pyshp.
115128

116129

117130
Testing Dependencies

0 commit comments

Comments
 (0)