Every-time I create an environment in anaconda navigator and install geopandas, I cannot seem to import Point,Line MultiLine etc in my projects when using the following code
I do the following
Create conda environment
Install geopandas in the environment
Open environment in python
run this code
from shapely.geometries import Line
this comes out
raceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/geometry/__init__.py", line 4, in <module> from .base import CAP_STYLE, JOIN_STYLE File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/geometry/base.py", line 17, in <module> from shapely.coords import CoordinateSequence File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/coords.py", line 8, in <module> from shapely.geos import lgeos File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/geos.py", line 113, in <module> free = load_dll('c').free File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/geos.py", line 56, in load_dll libname, fallbacks or [])) OSError: Could not find lib c or load any of its variants [].
Issue: Cannot import Line from shapely.geometry
Environment (
conda list
):Name Version Build Channel
attrs 19.1.0 py37_1
blas 1.0 mkl
bzip2 1.0.8 h1de35cc_0
ca-certificates 2019.5.15 0
cairo 1.14.12 hc4e6be7_4
certifi 2019.6.16 py37_1
click 7.0 py37_0
click-plugins 1.1.1 py_0
cligj 0.5.0 py37_0
curl 7.65.2 ha441bb4_0
cycler 0.10.0 py37_0
descartes 1.1.0 py_3
expat 2.2.6 h0a44026_0
fiona 1.8.4 py37h9a122fd_0
fontconfig 2.13.0 h5d5b041_1
freetype 2.9.1 hb4e5f40_0
freexl 1.0.5 h1de35cc_0
gdal 2.3.3 py37hbe65578_0
geopandas 0.4.1 py_0
geos 3.7.1 h0a44026_0
gettext 0.19.8.1 h15daf44_3
giflib 5.1.4 h1de35cc_1
glib 2.56.2 hd9629dc_0
hdf4 4.2.13 h39711bb_2
hdf5 1.10.4 hfa1e0ec_0
icu 58.2 h4b95b61_1
intel-openmp 2019.4 233
jpeg 9b he5867d9_2
json-c 0.13.1 h3efe00b_0
kealib 1.4.7 hf5ed860_6
kiwisolver 1.1.0 py37h0a44026_0
krb5 1.16.1 hddcf347_7
libboost 1.67.0 hebc422b_4
libcurl 7.65.2 h051b688_0
libcxx 4.0.1 hcfea43d_1
libcxxabi 4.0.1 hcfea43d_1
libdap4 3.19.1 h3d3e54a_0
libedit 3.1.20181209 hb402a30_0
libffi 3.2.1 h475c297_4
libgdal 2.3.3 h0950a36_0
libgfortran 3.0.1 h93005f0_2
libiconv 1.15 hdd342a3_7
libkml 1.3.0 hbe12b63_4
libnetcdf 4.6.1 hd5207e6_2
libpng 1.6.37 ha441bb4_0
libpq 11.2 h051b688_0
libspatialindex 1.8.5 h2c08c6b_2
libspatialite 4.3.0a h644ec7d_19
libssh2 1.8.2 ha12b0ac_0
libtiff 4.0.10 hcb84e12_2
libxml2 2.9.9 hf6e021a_1
mapclassify 2.0.1 py_0
matplotlib 3.1.0 py37h54f8f79_0
mkl 2019.4 233
mkl-service 2.0.2 py37h1de35cc_0
mkl_fft 1.0.12 py37h5e564d8_0
mkl_random 1.0.2 py37h27c97d8_0
munch 2.3.2 py37_0
ncurses 6.1 h0a44026_1
numpy 1.16.4 py37hacdab7b_0
numpy-base 1.16.4 py37h6575580_0
openjpeg 2.3.0 hb95cd4c_1
openssl 1.1.1c h1de35cc_1
pandas 0.25.0 py37h0a44026_0
pcre 8.43 h0a44026_0
pip 19.1.1 py37_0
pixman 0.38.0 h1de35cc_0
poppler 0.65.0 ha097c24_1
poppler-data 0.4.9 0
proj4 5.2.0 h0a44026_1
psycopg2 2.7.6.1 py37ha12b0ac_0
pyparsing 2.4.0 py_0
pyproj 1.9.6 py37h9c430a6_0
python 3.7.3 h359304d_0
python-dateutil 2.8.0 py37_0
pytz 2019.1 py_0
readline 7.0 h1de35cc_5
rtree 0.8.3 py37_0
scipy 1.3.0 py37h1410ff5_0
setuptools 41.0.1 py37_0
shapely 1.6.4 py37he8793f5_0
six 1.12.0 py37_0
sqlalchemy 1.3.5 py37h1de35cc_0
sqlite 3.29.0 ha441bb4_0
tk 8.6.8 ha441bb4_0
tornado 6.0.3 py37h1de35cc_0
wheel 0.33.4 py37_0
xerces-c 3.2.2 h44e365a_0
xz 5.2.4 h1de35cc_4
zlib 1.2.11 h1de35cc_3
zstd 1.3.7 h5bba6e5_0
Every-time I create an environment in anaconda navigator and install geopandas, I cannot seem to import Point,Line MultiLine etc in my projects when using the following code
I do the following
from shapely.geometries import Line
this comes out
raceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/geometry/__init__.py", line 4, in <module> from .base import CAP_STYLE, JOIN_STYLE File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/geometry/base.py", line 17, in <module> from shapely.coords import CoordinateSequence File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/coords.py", line 8, in <module> from shapely.geos import lgeos File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/geos.py", line 113, in <module> free = load_dll('c').free File "/Users/jacob/anaconda3/envs/gis/lib/python3.7/site-packages/shapely/geos.py", line 56, in load_dll libname, fallbacks or [])) OSError: Could not find lib c or load any of its variants [].