cartopy
cartopy copied to clipboard
geod_lineinit undefined
Description
Installed cartopy for python 3.6.8 in a virtual environment via pip under Linux. Going on to import cartopy under a Python prompt, I get an ImportError, indicating that geod_lineinit is an undefined symbol. Below is the traceback, with the path to the folder with the virtual environment abbreviated as "./"
Code to reproduce
import cartopy
Traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "./venv/lib/python3.6/site-packages/cartopy/__init__.py", line 96, in <module>
import cartopy.crs
File "./venv/lib/python3.6/site-packages/cartopy/crs.py", line 39, in <module>
import cartopy.trace
ImportError: ./venv/lib/python3.6/site-packages/cartopy/trace.cpython-36m-x86_64-linux-gnu.so: undefined symbol: geod_lineinit
Full environment definition
Operating system
Linux
Cartopy version
0.18.0
conda list
NA
pip list
Package Version
----------------- -----------
backcall 0.1.0
beautifulsoup4 4.9.1
bokeh 2.0.2
Cartopy 0.18.0
certifi 2020.4.5.2
cftime 1.1.3
chardet 3.0.4
click 7.1.2
cloudpickle 1.4.1
contextvars 2.4
cycler 0.10.0
Cython 0.29.19
dask 2.18.0
dask-jobqueue 0.7.1
decorator 4.4.2
distributed 2.18.0
docopt 0.6.2
fsspec 0.7.4
HeapDict 1.0.1
idna 2.9
immutables 0.14
ipykernel 5.3.0
ipython 7.15.0
ipython-genutils 0.2.0
jedi 0.17.0
Jinja2 2.11.2
jupyter-client 6.1.3
jupyter-core 4.6.3
kiwisolver 1.2.0
locket 0.2.0
MarkupSafe 1.1.1
matplotlib 3.2.1
msgpack 1.0.0
netCDF4 1.5.3
numpy 1.18.5
OWSLib 0.20.0
packaging 20.4
pandas 1.0.4
parso 0.7.0
partd 1.1.0
pexpect 4.8.0
pickleshare 0.7.5
Pillow 7.1.2
pip 20.1.1
prompt-toolkit 3.0.5
psutil 5.7.0
ptyprocess 0.6.0
Pydap 3.2.2
Pygments 2.6.1
pykdtree 1.3.1
pyparsing 2.4.7
pyproj 2.6.1.post1
pyshp 2.1.0
python-dateutil 2.8.1
pytz 2020.1
PyYAML 5.3.1
pyzmq 19.0.1
requests 2.23.0
scipy 1.4.1
setuptools 47.1.1
Shapely 1.7.0
six 1.15.0
sortedcontainers 2.2.2
soupsieve 2.0.1
tblib 1.6.0
toolz 0.10.0
tornado 6.0.4
traitlets 4.3.3
typing-extensions 3.7.4.2
urllib3 1.25.9
wcwidth 0.2.4
WebOb 1.8.6
wheel 0.34.2
zict 2.0.0
Do you have system level GEOS and PROJ installed? If so, which versions of those? I think this may be a GEOS library interfacing issue.
Yes: GEOS 3.8.1 and PROJ 6.1.1
What's the output of ldd ./venv/lib/python3.6/site-packages/cartopy/trace.cpython-36m-x86_64-linux-gnu.so
?
Here you go:
ldd ./venv/lib/python3.6/site-packages/cartopy/trace.cpython-36m-x86_64-linux-gnu.so
linux-vdso.so.1 => (0x00002aaaaaaab000)
libproj.so.0 => /lib64/libproj.so.0 (0x00002aaaaacee000)
libgeos_c.so.1 => /cm/shared/apps/geos/3.8.1/lib/libgeos_c.so.1 (0x00002aaaaaf41000)
libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00002aaaab179000)
libstdc++.so.6 => /cm/local/apps/gcc/6.1.0/lib64/libstdc++.so.6 (0x00002aaaab69e000)
libm.so.6 => /lib64/libm.so.6 (0x00002aaaaba20000)
libgcc_s.so.1 => /cm/local/apps/gcc/6.1.0/lib64/libgcc_s.so.1 (0x00002aaaabd22000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaabf39000)
libc.so.6 => /lib64/libc.so.6 (0x00002aaaac156000)
libgeos.so.3.8.1 => /cm/shared/apps/geos/3.8.1/lib/libgeos.so.3.8.1 (0x00002aaaac519000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaac8b7000)
libutil.so.1 => /lib64/libutil.so.1 (0x00002aaaacabc000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
And is /lib64/libproj.so.0
the correct and expected location? I see geos is in some other non-standard location.
And is /lib64/libproj.so.0
the correct and expected location? I see geos is in some other non-standard location.
Yes, it's a shared HPC environment, so things may be located differently
Hi, did you fix the issue at end? I face the same issues
We have just released v0.22 which should help with the compatibility between packages and installation much easier. Please open a new issue if you are still having problems.