conda-forge / osmnx-feedstock

A conda-smithy repository for osmnx.
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

Invalid Projection Error, Cannot Expand #43

Closed bradasteiner closed 5 years ago

bradasteiner commented 5 years ago

Issue: After installing via conda, and running a minimal code example, I am getting this error: pyproj.exceptions.CRSError: Invalid projection: +init=epsg:4326 +type=crs: (Internal Proj Error: proj_create: cannot expand +init=epsg:4326 +type=crs)

Code:

import osmnx as ox
G = ox.graph_from_place('Manhattan, New York, USA', network_type='drive')


Environment (conda list):

``` # Name Version Build Channel absl-py 0.7.1 altair 2.4.1 py37_0 conda-forge asn1crypto 0.24.0 py37_1003 conda-forge astor 0.7.1 attrs 19.1.0 py_0 conda-forge awscli 1.16.140 boost-cpp 1.68.0 h11c811c_1000 conda-forge botocore 1.12.130 branca 0.3.1 py_0 conda-forge bzip2 1.0.6 h14c3975_1002 conda-forge ca-certificates 2019.3.9 hecc5488_0 conda-forge cairo 1.14.12 h80bd089_1005 conda-forge certifi 2019.3.9 py37_0 conda-forge cffi 1.12.2 py37hf0e25f4_1 conda-forge chardet 3.0.4 py37_1003 conda-forge chardet 3.0.4 click 7.0 py_0 conda-forge Click 7.0 click-plugins 1.1.1 py_0 conda-forge cligj 0.5.0 py_0 conda-forge cligj 0.5.0 colorama 0.3.9 cryptography 2.6.1 py37h72c5cf5_0 conda-forge curl 7.64.0 hbc83047_2 cycler 0.10.0 py_1 conda-forge cycler 0.10.0 dbus 1.13.2 h714fa37_1 decorator 4.4.0 py_0 conda-forge descartes 1.1.0 py_3 conda-forge docutils 0.14 entrypoints 0.3 py37_1000 conda-forge expat 2.2.5 hf484d3e_1002 conda-forge Fiona 1.8.6 fiona 1.8.6 py37hf242f0b_2 conda-forge folium 0.8.3 py_0 conda-forge fontconfig 2.13.1 he4413a7_1000 conda-forge freetype 2.10.0 he983fc9_0 conda-forge freexl 1.0.5 h14c3975_1002 conda-forge gast 0.2.2 gdal 2.4.1 py37hf242f0b_1 conda-forge geographiclib 1.49 py_0 conda-forge geopandas 0.4.1 py_0 conda-forge geopy 1.19.0 py_0 conda-forge geos 3.7.1 hf484d3e_1000 conda-forge geotiff 1.5.1 he0d578f_1 conda-forge gettext 0.19.8.1 hc5be6a0_1002 conda-forge giflib 5.1.7 h516909a_1 conda-forge glib 2.56.2 had28632_1001 conda-forge google-streetview 1.2.9 grpcio 1.19.0 gst-plugins-base 1.14.0 hbbd80ab_1 gstreamer 1.14.0 hb453b48_1 h5py 2.9.0 hdf4 4.2.13 h9a582f1_1002 conda-forge hdf5 1.10.4 nompi_h3c11f04_1106 conda-forge icu 58.2 hf484d3e_1000 conda-forge idna 2.8 idna 2.8 py37_1000 conda-forge imageio 2.5.0 jinja2 2.10.1 py_0 conda-forge jmespath 0.9.4 jpeg 9c h14c3975_1001 conda-forge json-c 0.13.1 h14c3975_1001 conda-forge jsonschema 3.0.1 py37_0 conda-forge kealib 1.4.10 h1978553_1003 conda-forge Keras 2.2.4 Keras-Applications 1.0.7 Keras-Preprocessing 1.0.9 kiwisolver 1.0.1 py37h6bb024c_1002 conda-forge kiwisolver 1.0.1 krb5 1.16.1 h173b8e3_7 kwconfig 1.1.7 libblas 3.8.0 4_openblas conda-forge libcblas 3.8.0 4_openblas conda-forge libcurl 7.64.0 h20c2e04_2 libdap4 3.19.1 hd48c02d_1000 conda-forge libedit 3.1.20181209 hc058e9b_0 libffi 3.2.1 hd88cf55_4 libgcc-ng 8.2.0 hdf63c60_1 libgdal 2.4.1 h1500935_1 conda-forge libgfortran-ng 7.3.0 hdf63c60_0 libiconv 1.15 h516909a_1005 conda-forge libkml 1.3.0 h328b03d_1009 conda-forge liblapack 3.8.0 4_openblas conda-forge libnetcdf 4.6.2 hbdf4f91_1001 conda-forge libpng 1.6.37 hed695b0_0 conda-forge libpq 11.2 h20c2e04_0 libspatialindex 1.9.0 he1b5a44_0 conda-forge libspatialite 4.3.0a h3360108_1027 conda-forge libssh2 1.8.2 h22169c7_2 conda-forge libstdcxx-ng 8.2.0 hdf63c60_1 libtiff 4.0.10 h648cc4a_1001 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxml2 2.9.8 h143f9aa_1005 conda-forge mapclassify 2.0.1 py_0 conda-forge Markdown 3.1 markupsafe 1.1.1 py37h14c3975_0 conda-forge matplotlib 3.0.3 matplotlib 3.0.2 py37h8a2030e_1001 conda-forge matplotlib-base 3.0.2 py37h167e16e_1001 conda-forge mock 2.0.0 munch 2.3.2 munch 2.3.2 py_0 conda-forge ncurses 6.1 he6710b0_1 networkx 2.2 networkx 2.3 py_0 conda-forge numpy 1.16.2 py37h8b7e671_1 conda-forge openblas 0.3.5 h9ac9557_1001 conda-forge opencv-python 4.0.1.24 openjpeg 2.3.1 h58a6597_0 conda-forge openssl 1.1.1b h14c3975_1 conda-forge osmnx 0.9 py_1 conda-forge pandas 0.24.2 py37hf484d3e_0 conda-forge pbr 5.1.3 pcre 8.43 he6710b0_0 Pillow 6.0.0 pip 19.0.3 py37_0 pixman 0.34.0 h14c3975_1003 conda-forge poppler 0.67.0 h2fc8fa2_1002 conda-forge poppler-data 0.4.9 1 conda-forge postgresql 11.2 h20c2e04_0 proj4 6.0.0 h765ec9c_0 conda-forge protobuf 3.7.1 pthread-stubs 0.4 h14c3975_1001 conda-forge pyasn1 0.4.5 pycparser 2.19 py37_1 conda-forge pyopenssl 19.0.0 py37_0 conda-forge pyparsing 2.4.0 py_0 conda-forge pyproj 2.1.3 py37h7bc548f_1 conda-forge pyqt 5.6.0 py37h13b7fb3_1008 conda-forge pyrsistent 0.14.11 py37h14c3975_0 conda-forge pyshp 2.1.0 pysocks 1.6.8 py37_1002 conda-forge python 3.7.3 h0371630_0 python-dateutil 2.8.0 py_0 conda-forge pytz 2019.1 py_0 conda-forge PyWavelets 1.0.3 PyYAML 3.13 qt 5.6.3 h8bf5577_3 readline 7.0 h7b6447c_5 requests 2.21.0 py37_1000 conda-forge rsa 3.4.2 rtree 0.8.3 py37h666c49c_1002 conda-forge s3transfer 0.2.0 scikit-image 0.15.0 scipy 1.2.1 py37h09a28d5_1 conda-forge scipy 1.2.1 setuptools 40.8.0 py37_0 shapely 1.6.4 py37h2afed24_1003 conda-forge sip 4.18.1 py37hf484d3e_1000 conda-forge six 1.12.0 py37_1000 conda-forge six 1.12.0 sqlite 3.27.2 h7b6447c_0 tensorboard 1.13.1 tensorflow 1.13.1 tensorflow-estimator 1.13.0 termcolor 1.1.0 tk 8.6.8 hbc83047_0 toolz 0.9.0 py_1 conda-forge tornado 6.0.2 py37h516909a_0 conda-forge urllib3 1.24.1 urllib3 1.24.1 py37_1000 conda-forge vincent 0.4.4 py_1 conda-forge Werkzeug 0.15.2 wheel 0.33.1 py37_0 xerces-c 3.2.2 hac72e42_1001 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.9 h516909a_1004 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.7 h14c3975_1000 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xorg-libxext 1.3.4 h516909a_0 conda-forge xorg-libxrender 0.9.10 h516909a_1002 conda-forge xorg-renderproto 0.11.1 h14c3975_1002 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.4 h14c3975_4 zlib 1.2.11 h7b6447c_3 ```


Details about conda and system ( conda info ):

``` active environment : cv active env location : /home/brads/anaconda3/envs/cv shell level : 2 user config file : /home/brads/.condarc populated config files : conda version : 4.5.12 conda-build version : 3.17.6 python version : 3.7.1.final.0 base environment : /home/brads/anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/linux-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/linux-64 https://repo.anaconda.com/pkgs/pro/noarch package cache : /home/brads/anaconda3/pkgs /home/brads/.conda/pkgs envs directories : /home/brads/anaconda3/envs /home/brads/.conda/envs platform : linux-64 user-agent : conda/4.5.12 requests/2.21.0 CPython/3.7.1 Linux/4.15.0-47-generic ubuntu/16.04 glibc/2.23 UID:GID : 1000:1000 netrc file : None offline mode : False ```
ocefpaf commented 5 years ago

Looks like you got pyproj 2.1.3 but osmnx (actually I believe geopandas) expects pyproj <2. Your environment is quite messy with packages from conda-forge, defaults, and pip! Hard to debug... I recommend you re-creating it. First follow the instruction in https://conda-forge.org/docs/user/tipsandtricks.html#how-to-fix-it and then try:

conda create --name TEST python=3.7 osmnx
conda activate TEST
python -c "import osmnx as ox; G = ox.graph_from_place('Manhattan, New York, USA', network_type='drive')"

PS: everything works just fine on Linux for me. Closing this b/c it is an installation problem and not a problem with the feedstock.