conda-forge / osmnx-feedstock

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

Dependency issue with installing osmnx #14

Closed jurb closed 7 years ago

jurb commented 7 years ago

This is a known issue, installing osmnx with conda-forge gives this output:

In [1]: import osmnx as ox
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-a592ff119e79> in <module>()
----> 1 import osmnx as ox

/Users/jurian/anaconda/lib/python3.5/site-packages/osmnx/__init__.py in <module>()
      6 ###################################################################################################
      7
----> 8 from .core import *
      9 from .plot import *
     10 from .projection import *

/Users/jurian/anaconda/lib/python3.5/site-packages/osmnx/core.py in <module>()
     18 import numpy as np
     19 import pandas as pd
---> 20 import geopandas as gpd
     21 import networkx as nx
     22

/Users/jurian/anaconda/lib/python3.5/site-packages/geopandas/__init__.py in <module>()
      2 from geopandas.geodataframe import GeoDataFrame
      3
----> 4 from geopandas.io.file import read_file
      5 from geopandas.io.sql import read_postgis
      6 from geopandas.tools import sjoin

/Users/jurian/anaconda/lib/python3.5/site-packages/geopandas/io/file.py in <module>()
      1 import os
      2
----> 3 import fiona
      4 import numpy as np
      5 from shapely.geometry import mapping

/Users/jurian/anaconda/lib/python3.5/site-packages/fiona/__init__.py in <module>()
     67 from six import string_types
     68
---> 69 from fiona.collection import Collection, BytesCollection, vsi_path
     70 from fiona._drivers import driver_count, GDALEnv
     71 from fiona.drvsupport import supported_drivers

/Users/jurian/anaconda/lib/python3.5/site-packages/fiona/collection.py in <module>()
      7
      8 from fiona import compat
----> 9 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
     10 from fiona.ogrext import Session, WritingSession
     11 from fiona.ogrext import (

ImportError: dlopen(/Users/jurian/anaconda/lib/python3.5/site-packages/fiona/ogrext.cpython-35m-darwin.so, 2): Library not loaded: @rpath/libnetcdf.11.dylib
  Referenced from: /Users/jurian/anaconda/lib/libgdal.20.dylib
  Reason: Incompatible library version: libgdal.20.dylib requires version 12.0.0 or later, but libnetcdf.11.dylib provides version 11.0.0

After that I tried this

conda install -c anaconda libnetcdf=4.4.1
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment /Users/jurian/anaconda:

The following packages will be SUPERCEDED by a higher-priority channel:

    conda:     4.3.13-py35_0             --> 4.3.13-py35_0 anaconda
    conda-env: 2.6.0-0                   --> 2.6.0-0       anaconda
    libnetcdf: 4.4.1-0       conda-forge --> 4.4.1-0       anaconda

Proceed ([y]/n)? y

Now I seem to have another problem:

In [1]: import osmnx as ox
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-a592ff119e79> in <module>()
----> 1 import osmnx as ox

/Users/jurian/anaconda/lib/python3.5/site-packages/osmnx/__init__.py in <module>()
      6 ###################################################################################################
      7
----> 8 from .core import *
      9 from .plot import *
     10 from .projection import *

/Users/jurian/anaconda/lib/python3.5/site-packages/osmnx/core.py in <module>()
     18 import numpy as np
     19 import pandas as pd
---> 20 import geopandas as gpd
     21 import networkx as nx
     22

/Users/jurian/anaconda/lib/python3.5/site-packages/geopandas/__init__.py in <module>()
      2 from geopandas.geodataframe import GeoDataFrame
      3
----> 4 from geopandas.io.file import read_file
      5 from geopandas.io.sql import read_postgis
      6 from geopandas.tools import sjoin

/Users/jurian/anaconda/lib/python3.5/site-packages/geopandas/io/file.py in <module>()
      1 import os
      2
----> 3 import fiona
      4 import numpy as np
      5 from shapely.geometry import mapping

/Users/jurian/anaconda/lib/python3.5/site-packages/fiona/__init__.py in <module>()
     67 from six import string_types
     68
---> 69 from fiona.collection import Collection, BytesCollection, vsi_path
     70 from fiona._drivers import driver_count, GDALEnv
     71 from fiona.drvsupport import supported_drivers

/Users/jurian/anaconda/lib/python3.5/site-packages/fiona/collection.py in <module>()
      5 import sys
      6
----> 7 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
      8 from fiona.ogrext import Session, WritingSession
      9 from fiona.ogrext import (

ImportError: dlopen(/Users/jurian/anaconda/lib/python3.5/site-packages/fiona/ogrext.so, 2): Library not loaded: @rpath/libgeos-3.5.0.dylib
  Referenced from: /Users/jurian/anaconda/lib/libgdal.20.dylib
  Reason: image not found

I also created a new environment and installed osmnx in that, that gives me the exact last error I pasted here.

gboeing commented 7 years ago

@jurb this is on mac osx and python 3.5, right? Which OSMnx version?

jurb commented 7 years ago

@gboeing sorry I forgot to mention that, and yes, python 3.5 and OSX. I tried to install OSMnx today, so it's the most recent version (away from computer now so can't check the actual number, sorry).

gboeing commented 7 years ago

Thanks. That'd be v0.3.1.

ocefpaf commented 7 years ago

I am pretty sure that is a conda channel mismatch and not a osmnx issue. Can you open an issue at osmnx feedstock: https://github.com/conda-forge/osmnx-feedstock/issues

(I am in transit but I will take a look at it once I get back.)

gboeing commented 7 years ago

@ocefpaf this is https://github.com/conda-forge/osmnx-feedstock/issues :)

Thanks for your offer to help -- looking forward to your insights when you take a look.

ocefpaf commented 7 years ago

(Just saw that now :grimacing: problems of reading on the phone while travelling!)

I am away for the next week, meanwhile please take a look at: https://github.com/conda-forge/conda-forge.github.io/pull/325 hopefully that PR can help you fix understand the problem and fix it.

jurb commented 7 years ago

I initially failed to get osmnx working in a new environment as well, but it works now after putting conda-forge as default in my .condarc config using conda config --add channels conda-forge. After this conda create --yes -c conda-forge -n OSMNX python=3.6 osmnx and source activate OSMNX did the trick.

ocefpaf commented 7 years ago

I guess we can close this then. Let me know if you need any further help.

Monduiz commented 7 years ago

I did the recommended above and I am still getting an issue. I added channels conda-forge, did conda create --yes -c conda-forge -n OSMNX python=3.6 osmnx and source activate and I am getting this error:

Library not loaded: @rpath/libicui18n.58.dylib Referenced from: /Users/bjenkellefsen/anaconda3/lib/libgdal.20.dylib Reason: image not found

ocefpaf commented 7 years ago

@Monduiz can you post the result of conda info here.

Monduiz commented 7 years ago

conda info:

  platform : osx-64
      conda version : 4.2.13
   conda is private : False
  conda-env version : 4.2.13
conda-build version : not installed
     python version : 3.6.0.final.0
   requests version : 2.13.0
   root environment : /Users/bjenkellefsen/anaconda3  (writable)
default environment : /Users/bjenkellefsen/anaconda3
   envs directories : /Users/bjenkellefsen/anaconda3/envs
      package cache : /Users/bjenkellefsen/anaconda3/pkgs
       channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                      https://conda.anaconda.org/conda-forge/noarch
                      https://repo.continuum.io/pkgs/free/osx-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/pro/osx-64
                      https://repo.continuum.io/pkgs/pro/noarch
        config file : /Users/bjenkellefsen/.condarc
       offline mode : False
ocefpaf commented 7 years ago

@Monduiz I mean the command conda info. For example here is what I get:

> conda info                                                                        ⏎
Current conda install:

               platform : linux-64
          conda version : 4.3.11
       conda is private : False
      conda-env version : 4.3.11
    conda-build version : not installed
         python version : 3.6.0.final.0
       requests version : 2.12.4
       root environment : /home/filipe/miniconda3  (writable)
    default environment : /home/filipe/miniconda3
       envs directories : /home/filipe/miniconda3/envs
                          /home/filipe/.conda/envs
          package cache : /home/filipe/miniconda3/pkgs
                          /home/filipe/.conda/pkgs
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.continuum.io/pkgs/free/linux-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/linux-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/linux-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : /home/filipe/.condarc
           offline mode : False
             user-agent : conda/4.3.11 requests/2.12.4 CPython/3.6.0 Linux/3.16.7-53-desktop openSUSE /13.2 glibc/2.19
                UID:GID : 1000:100
Monduiz commented 7 years ago

Updated my info.

ocefpaf commented 7 years ago

Can you also post the conda list from in side the OSMNX env?

Monduiz commented 7 years ago

packages in environment at /Users/bjenkellefsen/anaconda3/envs/OSMNX:

ca-certificates           2017.1.23                     0    conda-forge
certifi                   2017.1.23                py36_0    conda-forge
click                     6.7                      py36_0    conda-forge
click-plugins             1.0.3                    py36_0    conda-forge
cligj                     0.4.0                    py36_0    conda-forge
curl                      7.52.1                        0    conda-forge
cycler                    0.10.0                   py36_0    conda-forge
decorator                 4.0.11                   py36_0    conda-forge
descartes                 1.1.0                    py36_0    conda-forge
expat                     2.1.0                         2    conda-forge
fiona                     1.7.4               np112py36_0    conda-forge
folium                    0.2.1                    py36_1    conda-forge
freetype                  2.7                           1    conda-forge
freexl                    1.0.2                         1    conda-forge
gdal                      2.1.3               np112py36_1    conda-forge
geopandas                 0.2.1                    py36_3    conda-forge
geopy                     1.11.0                   py36_0    conda-forge
geos                      3.5.1                         1    conda-forge
giflib                    5.1.4                         0    conda-forge
hdf4                      4.2.12                        0    conda-forge
hdf5                      1.8.17                        9    conda-forge
icu                       58.1                          1    conda-forge
jinja2                    2.9.5                    py36_0    conda-forge
jpeg                      9b                            0    conda-forge
json-c                    0.12                          0    conda-forge
kealib                    1.4.6                         3    conda-forge
libdap4                   3.18.3                        2    conda-forge
libgfortran               3.0.0                         0    conda-forge
libiconv                  1.14                          4    conda-forge
libnetcdf                 4.4.1.1                       2    conda-forge
libpng                    1.6.28                        0    conda-forge
libpq                     9.5.4                         3    conda-forge
libspatialindex           1.8.5                         1    conda-forge
libspatialite             4.3.0a                       14    conda-forge
libtiff                   4.0.6                         7    conda-forge
libxml2                   2.9.4                         4    conda-forge
markupsafe                0.23                     py36_1    conda-forge
matplotlib                2.0.0               np112py36_2    conda-forge
mkl                       2017.0.1                      0  
munch                     2.1.0                    py36_0    conda-forge
ncurses                   5.9                          10    conda-forge
networkx                  1.11                     py36_0    conda-forge
numpy                     1.12.0                   py36_0  
openjpeg                  2.1.2                         2    conda-forge
openssl                   1.0.2h                        3    conda-forge
osmnx                     0.4                      py36_0    conda-forge
pandas                    0.19.2              np112py36_1    conda-forge
pcre                      8.39                          0    conda-forge
pip                       9.0.1                    py36_0    conda-forge
proj4                     4.9.3                         2    conda-forge
psycopg2                  2.6.2                    py36_1    conda-forge
pyparsing                 2.1.10                   py36_0    conda-forge
pyproj                    1.9.5.1                  py36_0    conda-forge
pysal                     1.13.0                   py36_0    conda-forge
python                    3.6.0                         2    conda-forge
python-dateutil           2.6.0                    py36_0    conda-forge
pytz                      2016.10                  py36_0    conda-forge
readline                  6.2                           0    conda-forge
requests                  2.13.0                   py36_0    conda-forge
rtree                     0.8.3                    py36_0    conda-forge
scipy                     0.18.1              np112py36_1  
setuptools                33.1.0                   py36_0    conda-forge
shapely                   1.5.17              np112py36_2    conda-forge
six                       1.10.0                   py36_1    conda-forge
sqlalchemy                1.1.5                    py36_0    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        1    conda-forge
tornado                   4.4.2                    py36_0    conda-forge
vincent                   0.4.4                    py36_0    conda-forge
wheel                     0.29.0                   py36_0    conda-forge
xerces-c                  3.1.4                         3    conda-forge
xz                        5.2.2                         0    conda-forge
zlib                      1.2.11                        0    condo-forge
ocefpaf commented 7 years ago

@Monduiz I cannot see anything that wrong that pops the eye, with the exception of the "condo-forge" zlib package that may be a remnant from another channel addition.

I also cannot reproduce your error on Linux (I do not own a Mac to test it on OS X).

slwu89 commented 7 years ago

I also have the exact same problem, has there been any update? I have tried the various solutions both on this repo and the osmnx repo. My error message is Reason: Incompatible library version: libgdal.20.dylib requires version 45.0.0 or later, but libpng16.16.dylib provides version 44.0.0

conda info:

Current conda install:

               platform : osx-64
          conda version : 4.3.22
       conda is private : False
      conda-env version : 4.3.22
    conda-build version : not installed
         python version : 3.6.1.final.0
       requests version : 2.14.2
       root environment : /Users/slwu89/anaconda  (writable)
    default environment : /Users/slwu89/anaconda
       envs directories : /Users/slwu89/anaconda/envs
                          /Users/slwu89/.conda/envs
          package cache : /Users/slwu89/anaconda/pkgs
                          /Users/slwu89/.conda/pkgs
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.continuum.io/pkgs/free/osx-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/osx-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/osx-64
                          https://repo.continuum.io/pkgs/pro/noarch
            config file : /Users/slwu89/.condarc
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.22 requests/2.14.2 CPython/3.6.1 Darwin/16.7.0 OSX/10.12.6    
                UID:GID : 503:20
gboeing commented 7 years ago

@slwu89 is this inside a virtual environment? Can you post the output of conda list from that virtual env?

slwu89 commented 7 years ago

@gboeing yep, managing it with conda, here is what conda list gave me. Thanks!

_license                  1.1                      py36_1  
alabaster                 0.7.10                   py36_0  
anaconda                  4.4.0               np112py36_0  
anaconda-client           1.6.3                    py36_0  
anaconda-navigator        1.6.2                    py36_0  
anaconda-project          0.6.0                    py36_0  
appnope                   0.1.0                    py36_0  
appscript                 1.0.1                    py36_0  
asn1crypto                0.22.0                   py36_0  
astroid                   1.4.9                    py36_0  
astropy                   1.3.2               np112py36_0  
babel                     2.4.0                    py36_0  
backports                 1.0                      py36_0  
beautifulsoup4            4.6.0                    py36_0  
bitarray                  0.8.1                    py36_0  
blaze                     0.10.1                   py36_0  
bleach                    1.5.0                    py36_0  
bokeh                     0.12.5                   py36_1  
boto                      2.46.1                   py36_0  
bottleneck                1.2.1               np112py36_0  
branca                    0.2.0                    py36_0    conda-forge
cffi                      1.10.0                   py36_0  
chardet                   3.0.3                    py36_0  
click                     6.7                      py36_0  
click-plugins             1.0.3                    py36_0    conda-forge
cligj                     0.4.0                    py36_0    conda-forge
cloudpickle               0.2.2                    py36_0  
clyent                    1.2.2                    py36_0  
colorama                  0.3.9                    py36_0  
conda                     4.3.22                   py36_0    conda-forge
conda-env                 2.6.0                         0    conda-forge
contextlib2               0.5.5                    py36_0  
cryptography              1.8.1                    py36_0  
curl                      7.52.1                        0  
cycler                    0.10.0                   py36_0  
cython                    0.25.2                   py36_0  
cytoolz                   0.8.2                    py36_0  
dask                      0.14.3                   py36_1  
datashape                 0.5.4                    py36_0  
decorator                 4.0.11                   py36_0  
descartes                 1.1.0                    py36_0    conda-forge
distributed               1.16.3                   py36_0  
docutils                  0.13.1                   py36_0  
entrypoints               0.2.2                    py36_1  
et_xmlfile                1.0.1                    py36_0  
expat                     2.2.1                         0    conda-forge
fastcache                 1.0.2                    py36_1  
fiona                     1.7.6               np112py36_0    conda-forge
flask                     0.12.2                   py36_0  
flask-cors                3.0.2                    py36_0  
folium                    0.3.0                    py36_0    conda-forge
freetype                  2.5.5                         2  
freexl                    1.0.2                         1    conda-forge
gdal                      2.1.3               np112py36_0    conda-forge
geopandas                 0.2.1                    py36_4    conda-forge
geopy                     1.11.0                   py36_0    conda-forge
geos                      3.5.1                         1    conda-forge
get_terminal_size         1.0.0                    py36_0  
gevent                    1.2.1                    py36_0  
giflib                    5.1.4                         0    conda-forge
greenlet                  0.4.12                   py36_0  
h5py                      2.7.0               np112py36_0  
hdf4                      4.2.12                        0    conda-forge
hdf5                      1.8.17                        1  
heapdict                  1.0.0                    py36_1  
html5lib                  0.999                    py36_0  
icu                       54.1                          0  
idna                      2.5                      py36_0  
imagesize                 0.7.1                    py36_0  
ipykernel                 4.6.1                    py36_0  
ipython                   5.3.0                    py36_0  
ipython_genutils          0.2.0                    py36_0  
ipywidgets                6.0.0                    py36_0  
isort                     4.2.5                    py36_0  
itsdangerous              0.24                     py36_0  
jbig                      2.1                           0  
jdcal                     1.3                      py36_0  
jedi                      0.10.2                   py36_2  
jinja2                    2.9.6                    py36_0  
jpeg                      9b                            0  
json-c                    0.12                          0    conda-forge
jsonschema                2.6.0                    py36_0  
jupyter                   1.0.0                    py36_3  
jupyter_client            5.0.1                    py36_0  
jupyter_console           5.1.0                    py36_0  
jupyter_core              4.3.0                    py36_0  
kealib                    1.4.7                         1    conda-forge
krb5                      1.14.2                        0    conda-forge
lazy-object-proxy         1.2.2                    py36_0  
libdap4                   3.18.3                        2    conda-forge
libiconv                  1.14                          0  
libnetcdf                 4.4.1.1                       4    conda-forge
libpng                    1.6.27                        0  
libpq                     9.5.4                         4    conda-forge
libspatialindex           1.8.5                         1    conda-forge
libspatialite             4.3.0a                       15    conda-forge
libtiff                   4.0.6                         3  
libxml2                   2.9.4                         0  
libxslt                   1.1.29                        0  
llvmlite                  0.18.0                   py36_0  
locket                    0.2.0                    py36_1  
lxml                      3.7.3                    py36_0  
markupsafe                0.23                     py36_2  
matplotlib                2.0.2               np112py36_0  
mistune                   0.7.4                    py36_0  
mkl                       2017.0.1                      0  
mkl-service               1.1.2                    py36_3  
mpmath                    0.19                     py36_1  
msgpack-python            0.4.8                    py36_0  
multipledispatch          0.4.9                    py36_0  
munch                     2.1.1                    py36_0    conda-forge
navigator-updater         0.1.0                    py36_0  
nbconvert                 5.1.1                    py36_0  
nbformat                  4.3.0                    py36_0  
networkx                  1.11                     py36_0  
nltk                      3.2.3                    py36_0  
nose                      1.3.7                    py36_1  
notebook                  5.0.0                    py36_0  
numba                     0.33.0              np112py36_0  
numexpr                   2.6.2               np112py36_0  
numpy                     1.12.1                   py36_0  
numpydoc                  0.6.0                    py36_0  
odo                       0.5.0                    py36_1  
olefile                   0.44                     py36_0  
openjpeg                  2.1.2                         2    conda-forge
openpyxl                  2.4.7                    py36_0  
openssl                   1.0.2l                        0  
osmnx                     0.5.1                    py36_0    conda-forge
packaging                 16.8                     py36_0  
pandas                    0.20.1              np112py36_0  
pandocfilters             1.4.1                    py36_0  
partd                     0.3.8                    py36_0  
path.py                   10.3.1                   py36_0  
pathlib2                  2.2.1                    py36_0  
patsy                     0.4.1                    py36_0  
pcre                      8.39                          0    conda-forge
pep8                      1.7.0                    py36_0  
pexpect                   4.2.1                    py36_0  
pickleshare               0.7.4                    py36_0  
pillow                    4.1.1                    py36_0  
pip                       9.0.1                    py36_1  
ply                       3.10                     py36_0  
proj4                     4.9.3                         4    conda-forge
prompt_toolkit            1.0.14                   py36_0  
psutil                    5.2.2                    py36_0  
psycopg2                  2.7.1                    py36_0    conda-forge
ptyprocess                0.5.1                    py36_0  
py                        1.4.33                   py36_0  
pycosat                   0.6.2                    py36_0  
pycparser                 2.17                     py36_0  
pycrypto                  2.6.1                    py36_6  
pycurl                    7.43.0                   py36_2  
pyflakes                  1.5.0                    py36_0  
pygments                  2.2.0                    py36_0  
pylint                    1.6.4                    py36_1  
pyodbc                    4.0.16                   py36_0  
pyopenssl                 17.0.0                   py36_0  
pyparsing                 2.1.4                    py36_0  
pyproj                    1.9.5.1                  py36_0    conda-forge
pyqt                      5.6.0                    py36_1  
pysal                     1.13.0                   py36_0    conda-forge
pytables                  3.3.0               np112py36_0  
pytest                    3.0.7                    py36_0  
python                    3.6.1                         2  
python-dateutil           2.6.0                    py36_0  
python.app                1.2                      py36_4  
pytz                      2017.2                   py36_0  
pywavelets                0.5.2               np112py36_0  
pyyaml                    3.12                     py36_0  
pyzmq                     16.0.2                   py36_0  
qt                        5.6.2                         2  
qtawesome                 0.4.4                    py36_0  
qtconsole                 4.3.0                    py36_0  
qtpy                      1.2.1                    py36_0  
readline                  6.2                           2  
requests                  2.14.2                   py36_0  
rope                      0.9.4                    py36_1  
rtree                     0.8.3                    py36_0    conda-forge
ruamel_yaml               0.11.14                  py36_1  
scikit-image              0.13.0              np112py36_0  
scikit-learn              0.18.1              np112py36_1  
scipy                     0.19.0              np112py36_0  
seaborn                   0.7.1                    py36_0  
setuptools                27.2.0                   py36_0  
shapely                   1.5.17              np112py36_3    conda-forge
simplegeneric             0.8.1                    py36_1  
singledispatch            3.4.0.3                  py36_0  
sip                       4.18                     py36_0  
six                       1.10.0                   py36_0  
snowballstemmer           1.2.1                    py36_0  
sortedcollections         0.5.3                    py36_0  
sortedcontainers          1.5.7                    py36_0  
sphinx                    1.5.6                    py36_0  
spyder                    3.1.4                    py36_0  
sqlalchemy                1.1.9                    py36_0  
sqlite                    3.13.0                        0  
statsmodels               0.8.0               np112py36_0  
sympy                     1.0                      py36_0  
tblib                     1.3.2                    py36_0  
terminado                 0.6                      py36_0  
testpath                  0.3                      py36_0  
tk                        8.5.18                        0  
toolz                     0.8.2                    py36_0  
tornado                   4.5.1                    py36_0  
traitlets                 4.3.2                    py36_0  
unicodecsv                0.14.1                   py36_0  
unixodbc                  2.3.4                         0  
vincent                   0.4.4                    py36_0    conda-forge
wcwidth                   0.1.7                    py36_0  
werkzeug                  0.12.2                   py36_0  
wheel                     0.29.0                   py36_0  
widgetsnbextension        2.0.0                    py36_0  
wrapt                     1.10.10                  py36_0  
xerces-c                  3.1.4                         0  
xlrd                      1.0.0                    py36_0  
xlsxwriter                0.9.6                    py36_0  
xlwings                   0.10.4                   py36_0  
xlwt                      1.2.0                    py36_0  
xz                        5.2.2                         1  
yaml                      0.1.6                         0  
zict                      0.1.2                    py36_0  
zlib                      1.2.8                         3  
gboeing commented 7 years ago

@slwu89 it looks like most of these packages are coming from Anaconda's default channel rather than from the conda-forge channel, including the libpng package. Are the conda-forge channels listed at the top of your .condarc file?

loydg commented 7 years ago

I'm running macOS Sierra 10.12.6 and had the same problem when I tried running some sample code after installing osmnx using conda. A little internet research showed that the issue is not unique to osmnx - and it seems to involve the conda environment. After trying a few random things, I tried the simplest thing I could think of - I created a new environment named "geo" for osmnx as follows (python3).

conda create -c conda-forge --override-channels --name geo osmnx

This created a working macOS installation for me. All the examples that I've tried from this page - http://geoffboeing.com/2016/11/osmnx-python-street-networks/ - worked ok.

ocefpaf commented 7 years ago

A little internet research showed that the issue is not unique to osmnx - and it seems to involve the conda environment

Yep. See https://conda-forge.org/docs/conda-forge_gotchas.html

d3netxer commented 6 years ago

I fixed the problem for myself (OSX 10.13.1 ). The issue was due to my inexperience with anaconda, but the solution may help somebody else.

After doing initially what @jurb wrote:

putting conda-forge as default in my .condarc config using conda config --add channels conda-forge. After this conda create --yes -c conda-forge -n OSMNX python=3.6 osmnx and source activate OSMNX

...It was still not working in spyder. After much fumbling, I tried running python in the terminal and it worked. This meant that spyder was not reading the path of my activated environment. Therefore I installed spyder in my activated environment:

(myenv) conda install spyder  

I then restarted terminal, activated my environment, started spyder from the terminal and it worked!

usapkota commented 6 years ago

I was also having the same problem but creating environment like mentioned above as: conda create --yes -c conda-forge -n OSMNX python=3.6 osmnx solved my problem. I would like to understand what exactly was the problem and how did this solved it. I read all the comments from the beginning but I don't think I have understood it fully. Will anyone please do the honor.

gboeing commented 6 years ago

@usapkota this explains how creating a virtual environment helps solve these kinds of problems: https://conda-forge.org/docs/conda-forge_gotchas.html Basically, the conda-forge and anaconda defaults channels sometimes use different versions of a library, leading to a mismatch if you're mixing channels.

usapkota commented 6 years ago

@gboeing Yes, I think I understood that part. Please allow me to ask one more question to understand it better.

Part A: step 1: conda config --add channels conda-forge step 2: conda create -n conda_A python=3.6

Part B: step 1: conda config -- add channels conda-forge step 2: conda create --yes -c conda-forge -n conda_B python=3.6

what is the difference in conda_A and conda_B? ( if any)

gboeing commented 6 years ago

I believe these are equivalent, given the documentation.

abe732 commented 6 years ago

Ran into this issue again today, after running into this last year around the same time. I needed to add the --override-channels flag when creating the new environment. Crazy after a year this is still a problem with working with osmnx...

gboeing commented 6 years ago

@abe732 for the sake of others who might stumble on this thread, can you confirm the full command that worked for you? Was it:

conda create --override-channels -c conda-forge -n OSMNX python=3 osmnx
abe732 commented 6 years ago

Whoops, sorry! Yea that's the command (had to use that even though I had conda-forge as the first channel). Word of warning though, I'm on a mac and after activating the environment OSMNX it pushed me down this rabbit hole of issues: https://github.com/conda-forge/geopandas-feedstock/issues/31

Solution was to remove geopandas, fiona and shapely via conda and then pip install them

ocefpaf commented 6 years ago

Note that we are seeing some incompatibilities in the latest OS X system and shapely. I cannot reproduce that using the OS X VM available in Travis-CI and I do not own a mac to research this further.

Using pip works b/c they are static linked, this suggests that latest OS X may have a system wide geos installed, not sure. If so, the patch we have to find conda geos is not working :unamused:

TL;DR I have no idea what the issue really is and I do not have the tools to fix it.

gboeing commented 6 years ago

@ocefpaf I am in the same situation as you: I do not have a Mac and I have never been able to reproduce this issue on my Linux or Windows machines or CI. For now it looks like a potential solution from @abe732 is to run

conda create --override-channels -c conda-forge -n OSMNX python=3 osmnx

and if there are still problems, then remove geopandas, fiona and shapely via conda and then pip install them.

usapkota commented 6 years ago

Actually I was having a same issue few months ago on my Mac. I also ran into the issue while installing geopandas. For me what worked is:

  1. I created conda env like shown by gboeing.
  2. Even when I have conda-forge above default I specified channel as conda forge while installing anything.
  3. Installed geopandas as conda install -c conda-forge geopandas
  4. Its rocking so far, and love geopandas.
abe732 commented 6 years ago

Also, not sure if this should go here, but I was having more trouble today. Wanted to share if people run into the same issue: the order of imports matters and will throw errors as well with the geopandas dependency. For me it was Basemap which needed to be imported after osmnx. But could be something different for other people (some forums suggested it could be shapely, but it wasn't the issue for me). I don't really know. Here's more info: https://stackoverflow.com/questions/27675734/python-basemap-assertion-failed