1

I am working with Python 3.8 on a macOS El Capitan 10.11.6

I have installed geopandas via pip

pip3 install geopandas

when I run

import geopandas as gpd

I get the following error

/usr/local/lib/python3.8/site-packages/geopandas/__init__.py in <module>
      1 from geopandas._config import options  # noqa
      2 
----> 3 from geopandas.geoseries import GeoSeries  # noqa
      4 from geopandas.geodataframe import GeoDataFrame  # noqa
      5 from geopandas.array import points_from_xy  # noqa

/usr/local/lib/python3.8/site-packages/geopandas/geoseries.py in <module>
      7 from pandas.core.internals import SingleBlockManager
      8 
----> 9 from pyproj import CRS, Transformer
     10 from shapely.geometry.base import BaseGeometry
     11 

/usr/local/lib/python3.8/site-packages/pyproj/__init__.py in <module>
     47 import warnings
     48 
---> 49 import pyproj.network
     50 from pyproj._datadir import (  # noqa: F401
     51     _pyproj_global_context_initialize,

/usr/local/lib/python3.8/site-packages/pyproj/network.py in <module>
      8 import certifi
      9 
---> 10 from pyproj._network import (  # noqa: F401
     11     _set_ca_bundle_path,
     12     is_network_enabled,

ImportError: dlopen(/usr/local/lib/python3.8/site-packages/pyproj/_network.cpython-38-darwin.so, 2): Symbol not found: _clock_gettime
  Referenced from: /usr/local/lib/python3.8/site-packages/pyproj/.dylibs/liblzma.5.dylib (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib
 in /usr/local/lib/python3.8/site-packages/pyproj/.dylibs/liblzma.5.dylib
Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
emax
  • 6,965
  • 19
  • 74
  • 141
  • maybe [that](https://stackoverflow.com/questions/49969800/why-is-pip-installing-pillow-for-os-x-10-12-when-i-have-os-x-10-11-installed/49987984#49987984) will help. That is not an error about geopandas, it is about `Pillow` and `Mac OS` – Barış Çiçek Nov 06 '20 at 11:29
  • @BarışÇiçek I have done it `pip3 install 'pillow!=5.1.0` and I get `Requirement already satisfied: pillow!=5.1.0 in /usr/local/lib/python3.8/site-packages (8.0.1)` – emax Nov 06 '20 at 11:58
  • make sure you are using python in anaconda environment to use geopandas – Ratnapal Shende Nov 06 '20 at 13:20
  • @RatnapalShende Using Anaconda is *not* a requirement for `geopandas`. Also I don't see how this is connected to pillow. The trace does not mention pillow nor do the [geopandas installation instructions](https://geopandas.org/install.html#installing-with-pip). As for the original question, it clearly says that there is a problem with `pyproj`. – Niko Föhr Nov 06 '20 at 13:56
  • Have you tried reinstalling `pyproj`? What version or `pyproj` you are using? – Niko Föhr Nov 06 '20 at 14:09
  • @np8 `pip3 install pyproj Requirement already satisfied: pyproj in /usr/local/lib/python3.8/site-packages (3.0.0.post1) Requirement already satisfied: certifi in /usr/local/lib/python3.8/site-packages (from pyproj) (2020.6.20)` – emax Nov 06 '20 at 14:36
  • 1
    @np8 I solved this by installing `pyproj 2.5.0` – emax Nov 06 '20 at 14:42

0 Answers0