pysal / tobler

Spatial interpolation, Dasymetric Mapping, & Change of Support
https://pysal.org/tobler
BSD 3-Clause "New" or "Revised" License
146 stars 30 forks source link

ImportError: cannot import name 'CRS' from 'pyproj' #67

Closed sjsrey closed 4 years ago

sjsrey commented 4 years ago
(analytical) src/tobler - [master] » python
Python 3.7.7 (default, Mar 23 2020, 22:36:06) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tobler
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sjsrey/p/pysal/src/tobler/tobler/__init__.py", line 7, in <module>
    from . import area_weighted
  File "/home/sjsrey/p/pysal/src/tobler/tobler/area_weighted/__init__.py", line 1, in <module>
    from .area_weighted import area_interpolate_binning as area_interpolate
  File "/home/sjsrey/p/pysal/src/tobler/tobler/area_weighted/area_weighted.py", line 8, in <module>
    from .vectorized_raster_interpolation import fast_append_profile_in_gdf
  File "/home/sjsrey/p/pysal/src/tobler/tobler/area_weighted/vectorized_raster_interpolation.py", line 22, in <module>
    from tobler.util.util import _check_presence_of_crs
  File "/home/sjsrey/p/pysal/src/tobler/tobler/util/__init__.py", line 1, in <module>
    from .util import *
  File "/home/sjsrey/p/pysal/src/tobler/tobler/util/util.py", line 7, in <module>
    from pyproj import CRS
ImportError: cannot import name 'CRS' from 'pyproj' (/home/sjsrey/anaconda3/envs/analytical/lib/python3.7/site-packages/pyproj/__init__.py)
>>> import pyproj
>>> pyproj.__version__
'1.9.6'
sjsrey commented 4 years ago

Note that this is due to mixing channels with pyproj coming from default and other deps coming from conda-forge. If all are installed from conda-forge all is well.

knaaptime commented 4 years ago

we should probably still enforce a minimum version for either pyproj or geopandas

afmv1089 commented 3 years ago

Note that this is due to mixing channels with pyproj coming from default and other deps coming from conda-forge. If all are installed from conda-forge all is well.

how to fix it?