Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError #28

Closed
ISeemToBeAVerb opened this issue Jan 29, 2017 · 3 comments
Closed

ImportError #28

ISeemToBeAVerb opened this issue Jan 29, 2017 · 3 comments

Comments

@ISeemToBeAVerb
Copy link

Sorry if this is a simple problem, I'm not really a coder...

Problem description (what did you do, what did you expect to happen, and what actually happened)

Installed Anaconda OS X Graphical Installer, left everything at default and ran

conda install -c conda-forge osmnx

I then opened Spyder and pasted in the following example code from the website:

import osmnx as ox
ox.plot_graph(ox.graph_from_place('Modena, Italy'))

When I run the code (as well as other examples) I keep getting this ImportError:

ImportError: dlopen(//anaconda/lib/python3.5/site-packages/fiona/ogrext.cpython-35m-darwin.so, 2): Library not loaded: @rpath/libnetcdf.11.dylib
  Referenced from: //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

What operating system, architecture, Python version, and OSMnx version are you using?

OS X Sierra (10.12.2), Anaconda 4.2.0, Python 3.5, OSMnx 0.2.2

Complete list of your environment's packages and their versions (for example, run conda list or pip list then paste the output below)

appnope 0.1.0 py35_0
click 6.6 py35_1 conda-forge
click-plugins 1.0.3 py35_0 conda-forge
cligj 0.4.0 py35_0 conda-forge
curl 7.52.1 0 conda-forge
cycler 0.10.0 py35_0 conda-forge
decorator 4.0.11 py35_0
descartes 1.1.0 py35_0 conda-forge
entrypoints 0.2.2 py35_0
fiona 1.7.2 np111py35_0 conda-forge
freetype 2.6.3 1 conda-forge
gdal 2.1.0 py35_0
geopandas 0.2.1 py35_3 conda-forge
geopy 1.11.0 py35_0 conda-forge
geos 3.5.1 1 conda-forge
geotiff 1.4.1 0
hdf4 4.2.12 0 conda-forge
hdf5 1.8.17 9 conda-forge
icu 54.1 0
ipykernel 4.5.2 py35_0
ipython 5.1.0 py35_1
ipython_genutils 0.1.0 py35_0
ipywidgets 5.2.2 py35_1
jinja2 2.9.4 py35_0
jpeg 9b 0 conda-forge
jsonschema 2.5.1 py35_0
jupyter 1.0.0 py35_3
jupyter_client 4.4.0 py35_0
jupyter_console 5.0.0 py35_0
jupyter_core 4.2.1 py35_0
kealib 1.4.6 3 conda-forge
libgdal 2.1.0 0
libgfortran 3.0.0 0 conda-forge
libnetcdf 4.4.1 0 conda-forge
libpng 1.6.28 0 conda-forge
libpq 9.5.4 3 conda-forge
libspatialindex 1.8.5 1 conda-forge
libtiff 4.0.6 7 conda-forge
markupsafe 0.23 py35_2
matplotlib 2.0.0 np111py35_1 conda-forge
mistune 0.7.3 py35_1
mkl 2017.0.1 0
munch 2.1.0 py35_0 conda-forge
nbconvert 4.2.0 py35_0
nbformat 4.2.0 py35_0
networkx 1.11 py35_0 conda-forge
notebook 4.3.1 py35_0
numpy 1.11.3 py35_0
openssl 1.0.2k 0
osmnx 0.2.2 py35_0 conda-forge
pandas 0.19.2 np111py35_1 conda-forge
path.py 10.0 py35_0
pexpect 4.2.1 py35_0
pickleshare 0.7.4 py35_0
pip 9.0.1 py35_1
proj4 4.9.2 0
prompt_toolkit 1.0.9 py35_0
psycopg2 2.6.2 py35_1 conda-forge
ptyprocess 0.5.1 py35_0
pygments 2.1.3 py35_0
pyparsing 2.1.10 py35_0 conda-forge
pyproj 1.9.5.1 py35_0 conda-forge
pyqt 5.6.0 py35_2
pysal 1.13.0 py35_0 conda-forge
python 3.5.2 0
python-dateutil 2.6.0 py35_0 conda-forge
pytz 2016.10 py35_0 conda-forge
pyzmq 16.0.2 py35_0
qt 5.6.2 0
qtconsole 4.2.1 py35_1
readline 6.2 2
requests 2.13.0 py35_0 conda-forge
rtree 0.8.3 py35_0 conda-forge
scipy 0.18.1 np111py35_1
setuptools 27.2.0 py35_0
shapely 1.5.17 np111py35_2 conda-forge
simplegeneric 0.8.1 py35_1
sip 4.18 py35_0
six 1.10.0 py35_0
sqlalchemy 1.1.5 py35_0 conda-forge
sqlite 3.13.0 0
terminado 0.6 py35_0
tk 8.5.18 0
tornado 4.4.2 py35_0
traitlets 4.3.1 py35_0
wcwidth 0.1.7 py35_0
wheel 0.29.0 py35_0
widgetsnbextension 1.2.6 py35_0
xerces-c 3.1.4 0
xz 5.2.2 1
zlib 1.2.8 3

Code that reproduces the issue

I've used this example code, as well as other examples given in the docs.

import osmnx as ox
ox.plot_graph(ox.graph_from_place('Modena, Italy'))
@gboeing
Copy link
Owner

gboeing commented Jan 29, 2017

It looks like you have conflicting package versions. Best to isolate the OSMnx install in a virtual environment if this is the case:

conda create --yes -c conda-forge -n OSMNX python=3.6 osmnx
source activate OSMNX

Then just launch your python interpreter and run the code. See also #25

@ISeemToBeAVerb
Copy link
Author

Worked great, thank you!

@gboeing
Copy link
Owner

gboeing commented Feb 26, 2017

For future reference, see conda-forge/osmnx-feedstock#14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants