0

After a system re-imaging, I am seeing this error message when trying to run a script involving shapely:

OSError: Could not find lib geos_c.dll or load any of its variants ['C:\\Users\\myusername\\AppData\\Local\\Continuum\\anaconda3\\envs\\CS\\Library\\lib\\geos_c.dll']

Unlike a lot of the questions asked online, or like this, for me the issue occurred not during installation, but when I actually tried to run the script.

I tried the work-around about installing OsGeo4W and adding the folder in environment variable and it did not work for me. I also tried copying geos_c.dll from C:\OSGeo4W64\bin into C:\\Users\\myusername\\AppData\\Local\\Continuum\\anaconda3\\envs\\CS\\Library\\lib\\, did not work either. I ran script in cmd, Anaconda Prompt & PyCharm, and the same error message persists.

I saw this link, saying it is an issue with the version of geos/shapely, but when I tried to do conda install shapely=1.6.3, I got this:

Package vc conflicts for:
python=3.6 -> vc[version='14.*|>=14,<15.0a0|>=14.1,<15.0a0']
Package geos conflicts for:
shapely=1.6.3 -> geos==3.6.2
Package vs2015_runtime conflicts for:
python=3.6 -> vs2015_runtime
Package numpy conflicts for:
shapely=1.6.3 -> numpy[version='>=1.11|>=1.8|>=1.9']
Package sqlite conflicts for:
python=3.6 -> sqlite[version='>=3.25.3,<4.0a0|>=3.26.0,<4.0a0|>=3.29.0,<4.0a0']
Package pip conflicts for:
python=3.6 -> pip
Note that strict channel priority may have removed packages required for satisfiability.

I do not know what else to do, please help. Here is the list of packages I have:

# Name                    Version                   Build  Channel
asn1crypto                0.24.0                py36_1003    conda-forge
attrs                     19.1.0                     py_0    conda-forge
boost-cpp                 1.70.0               h6a4c333_2    conda-forge
bzip2                     1.0.8                hfa6e2cd_0    conda-forge
ca-certificates           2019.6.16            hecc5488_0    conda-forge
certifi                   2019.6.16                py36_1    conda-forge
cffi                      1.12.3           py36hb32ad35_0    conda-forge
cfitsio                   3.470                hfa6e2cd_2    conda-forge
chardet                   3.0.4                 py36_1003    conda-forge
click                     7.0                        py_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.5.0                      py_0    conda-forge
cryptography              2.7              py36hb32ad35_0    conda-forge
curl                      7.65.3               h4496350_0    conda-forge
expat                     2.2.5             habb2df7_1003    conda-forge
fiona                     1.8.6            py36h2979200_4    conda-forge
freetype                  2.10.0               h563cfd7_1    conda-forge
freexl                    1.0.5             hd288d7e_1002    conda-forge
gdal                      2.4.2            py36he6b6c38_4    conda-forge
geos                      3.7.2                he025d50_1    conda-forge
geotiff                   1.5.1                h8f84788_2    conda-forge
gettext                   0.19.8.1          hb01d8f6_1002    conda-forge
glib                      2.58.3            hc0c2ac7_1002    conda-forge
hdf4                      4.2.13            hf8e6fe8_1002    conda-forge
hdf5                      1.10.5          nompi_ha405e13_1103    conda-forge
icu                       64.2                 he025d50_1    conda-forge
idna                      2.8                   py36_1000    conda-forge
intel-openmp              2019.4                      245
jpeg                      9c                hfa6e2cd_1001    conda-forge
kealib                    1.4.10            hf7dc31f_1005    conda-forge
krb5                      1.16.3            hdd46e55_1001    conda-forge
libblas                   3.8.0                    12_mkl    conda-forge
libcblas                  3.8.0                    12_mkl    conda-forge
libcurl                   7.65.3               h4496350_0    conda-forge
libffi                    3.2.1             h6538335_1006    conda-forge
libgdal                   2.4.2                h2bdb96c_4    conda-forge
libiconv                  1.15              hfa6e2cd_1005    conda-forge
libkml                    1.3.0             h4ece8bf_1010    conda-forge
liblapack                 3.8.0                    12_mkl    conda-forge
libnetcdf                 4.6.2             h376842a_1003    conda-forge
libpng                    1.6.37               h7602738_0    conda-forge
libpq                     11.5                 hb0bdaea_1    conda-forge
libspatialite             4.3.0a            h832c139_1029    conda-forge
libssh2                   1.8.2                h642c060_2    conda-forge
libtiff                   4.0.10            h6512ee2_1003    conda-forge
libxml2                   2.9.9                h9ce36c8_5    conda-forge
lz4-c                     1.8.3             he025d50_1001    conda-forge
m2w64-expat               2.1.1                         2
m2w64-gcc-libgfortran     5.3.0                         6
m2w64-gcc-libs            5.3.0                         7
m2w64-gcc-libs-core       5.3.0                         7
m2w64-gettext             0.19.7                        2
m2w64-gmp                 6.1.0                         2
m2w64-libiconv            1.14                          6
m2w64-libwinpthread-git   5.0.0.4634.697f757               2
m2w64-xz                  5.2.2                         2
mkl                       2019.4                      245
msys2-conda-epoch         20160418                      1
munch                     2.3.2                      py_0    conda-forge
numpy                     1.17.2           py36hc71023c_0    conda-forge
openjpeg                  2.3.1                hb24c2e3_1    conda-forge
openssl                   1.1.1c               hfa6e2cd_0    conda-forge
pcre                      8.41              h6538335_1003    conda-forge
pip                       19.2.3                   py36_0    conda-forge
poppler                   0.67.0               h92819f6_7    conda-forge
poppler-data              0.4.9                         1    conda-forge
postgresql                11.5                 h06f7779_1    conda-forge
proj4                     6.1.0                hc2d0af5_2    conda-forge
pycparser                 2.19                     py36_1    conda-forge
pyopenssl                 19.0.0                   py36_0    conda-forge
pysocks                   1.7.0                    py36_0    conda-forge
python                    3.6.7             he025d50_1005    conda-forge
requests                  2.22.0                   py36_1    conda-forge
setuptools                41.2.0                   py36_0    conda-forge
shapely                   1.6.4           py36ha35856d_1006    conda-forge
six                       1.12.0                py36_1000    conda-forge
sqlite                    3.29.0               hfa6e2cd_1    conda-forge
tk                        8.6.9             hfa6e2cd_1002    conda-forge
urllib3                   1.25.3                   py36_0    conda-forge
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_0
wheel                     0.33.6                   py36_0    conda-forge
win_inet_pton             1.1.0                    py36_0    conda-forge
wincertstore              0.2                   py36_1002    conda-forge
xerces-c                  3.2.2             h6538335_1004    conda-forge
xz                        5.2.4             h2fa13f4_1001    conda-forge
zlib                      1.2.11            h2fa13f4_1005    conda-forge
zstd                      1.4.0                hd8a0e53_0    conda-forge
1

The same thing happened to me. Running conda install -c conda-forge geos=3.7.1 worked for me. Not sure, but it might have to do with the recently uploaded version, as you can see in https://anaconda.org/conda-forge/geos/files?version=3.7.2 there is a new version uploaded the day before yesterday.

  • I got this error when trying to do that: UnsatisfiableError: The following specifications were found to be incompatible with each other: Package vs2015_runtime conflicts for: python=3.6 -> vs2015_runtime Package vc conflicts for: python=3.6 -> vc[version='14.*|>=14,<15.0a0'] Package pip conflicts for: python=3.6 -> pip Note that strict channel priority may have removed packages required for satisfiability. It is a fresh environment, do not know what is wrong. – TOuyang Sep 10 at 13:09
  • I set channel_priority back to flexible and your suggestion works. However, all shapely, geos, gdal, libgdal installed are from the default channel not conda-forge. I guess there must be some incompatibility issues going on in conda-forge that has yet been fixed. – TOuyang Sep 10 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.