libspatialindex dependency for Geopandas
install libspatialindex (http://libspatialindex.github.io/install.html) on the Jupyter environment
libspatialindex is a dependency for rtree (http://toblerity.org/rtree/) which is a dependancy for geopandas (http://geopandas.org/install.html#dependencies).

-
henry F commented
What I found worked:
I found this worked to install geopandas.
!conda update -n base -c defaults conda --y
!pip install geopandas
import geopandas as gpd -
Anonymous commented
It looks like Python 2.x is no longer available, only 3.x. I'm getting the same error as described in Stephen Mc's message.
Geopandas is a definite need for spatial data science ...
-
Stephen Mc commented
Ultimately, I would like to do spatial joins like those described here:
-
Stephen Mc commented
when I import geopandas, I get this
OSErrorTraceback (most recent call last)
<ipython-input-4-f8b81fe8ca07> in <module>()
----> 1 import geopandas as gpd/resources/common/.virtualenv/python2/lib/python2.7/site-packages/geopandas/__init__.py in <module>()
----> 1 from geopandas.geoseries import GeoSeries
2 from geopandas.geodataframe import GeoDataFrame
3
4 from geopandas.io.file import read_file
5 from geopandas.io.sql import read_postgis/resources/common/.virtualenv/python2/lib/python2.7/site-packages/geopandas/geoseries.py in <module>()
14
15 from geopandas.plotting import plot_series
---> 16 from geopandas.base import GeoPandasBase
17
18 OLD_PANDAS = issubclass(Series, np.ndarray)/resources/common/.virtualenv/python2/lib/python2.7/site-packages/geopandas/base.py in <module>()
13
14 try:
---> 15 from rtree.core import RTreeError
16 HAS_SINDEX = True
17 except ImportError:/resources/common/.virtualenv/python2/lib/python2.7/site-packages/rtree/__init__.py in <module>()
----> 1 from .index import Rtree
2
3 from .core import rt
4
5 __version__ = '0.8.3'/resources/common/.virtualenv/python2/lib/python2.7/site-packages/rtree/index.py in <module>()
3 import pprint
4
----> 5 from . import core
6 import ctypes
7 try:/resources/common/.virtualenv/python2/lib/python2.7/site-packages/rtree/core.py in <module>()
123
124 if lib_name is None:
--> 125 raise OSError("Could not find libspatialindex_c library file")
126
127 rt = ctypes.CDLL(lib_name)OSError: Could not find libspatialindex_c library file
-
AdminLeon Katsnelson (Director & CTO, IBM Analytics Emerging Technology, Cognitive Class Labs) commented
If I understand this feature request correctly, the goal is to be able to use GeoPandas to work in Jupyter notebooks. I hope I got this right.
I tried installing GeoPandas in a Python 2 Jupyter notebook. Everything seems to have worked and I did not get any messages about unsatisfied dependencies:!pip install geopandas
Collecting geopandas
Downloading geopandas-0.2.1-py2.py3-none-any.whl (199kB)
100% |████████████████████████████████| 204kB 3.2MB/s
Collecting pyproj (from geopandas)
Downloading pyproj-1.9.5.1.tar.gz (4.4MB)
100% |████████████████████████████████| 4.4MB 186kB/s
Requirement already satisfied (use --upgrade to upgrade): pandas in /usr/local/lib/python2.7/dist-packages (from geopandas)
Collecting fiona (from geopandas)
Downloading Fiona-1.7.1.post1-cp27-cp27mu-manylinux1_x86_64.whl (39.7MB)
100% |████████████████████████████████| 39.7MB 20kB/s
Collecting shapely (from geopandas)
Downloading Shapely-1.5.17.post1-cp27-cp27mu-manylinux1_x86_64.whl (8.3MB)
100% |████████████████████████████████| 8.3MB 105kB/s
Collecting descartes (from geopandas)
Downloading descartes-1.0.2-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/local/lib/python2.7/dist-packages (from pandas->geopandas)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.7.0 in /usr/local/lib/python2.7/dist-packages (from pandas->geopandas)
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in /usr/local/lib/python2.7/dist-packages (from pandas->geopandas)
Collecting cligj (from fiona->geopandas)
Downloading cligj-0.4.0-py2-none-any.whl
Collecting click-plugins (from fiona->geopandas)
Downloading click-plugins-1.0.3.tar.gz
Collecting munch (from fiona->geopandas)
Downloading munch-2.0.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/lib/python2.7/dist-packages (from fiona->geopandas)
Requirement already satisfied (use --upgrade to upgrade): click>=4.0 in ./common/.virtualenv/python2/lib/python2.7/site-packages (from cligj->fiona->geopandas)
Building wheels for collected packages: pyproj, click-plugins, munch
Running setup.py bdist_wheel for pyproj ... - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ done
Stored in directory: /home/notebook/.cache/pip/wheels/85/dd/2f/d1ed07a507c7adb330cda0afcc96cae8e9abb4d85bbb788bdf
Running setup.py bdist_wheel for click-plugins ... - done
Stored in directory: /home/notebook/.cache/pip/wheels/70/d7/3d/188128669f2aa42f6008217d9e2e6826d398dc3e361c0fcb75
Running setup.py bdist_wheel for munch ... - done
Stored in directory: /home/notebook/.cache/pip/wheels/09/dd/7e/90fd2e7735566f3b6d7faad334a6b7b1ae0b8b5601616d7086
Successfully built pyproj click-plugins munch
Installing collected packages: pyproj, cligj, click-plugins, munch, fiona, shapely, descartes, geopandas
Successfully installed click-plugins-1.0.3 cligj-0.4.0 descartes-1.0.2 fiona-1.7.1.post1 geopandas-0.2.1 munch-2.0.4 pyproj-1.9.5.1 shapely-1.5.17.post1
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.I understand that Rtree is an optional package so I went ahead and installed it as well. And it also installed just fine.
!pip install rtree
Collecting rtree
Downloading Rtree-0.8.3-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./common/.virtualenv/python2/lib/python2.7/site-packages (from rtree)
Installing collected packages: rtree
Successfully installed rtree-0.8.3
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.Does that mean that this feature request is no longer needed?