Coder Social home page Coder Social logo

shapely-feedstock's Introduction

About shapely-feedstock

Feedstock license: BSD-3-Clause

Home: https://github.com/shapely/shapely

Package license: BSD-3-Clause

Summary: Python package for manipulation and analysis of geometric objects in the Cartesian plane

Current build status

Azure
VariantStatus
linux_64_numpy1.22python3.10.____cpython variant
linux_64_numpy1.22python3.8.____cpython variant
linux_64_numpy1.22python3.9.____73_pypy variant
linux_64_numpy1.22python3.9.____cpython variant
linux_64_numpy1.23python3.11.____cpython variant
linux_64_numpy1.26python3.12.____cpython variant
linux_aarch64_numpy1.22python3.10.____cpython variant
linux_aarch64_numpy1.22python3.8.____cpython variant
linux_aarch64_numpy1.22python3.9.____73_pypy variant
linux_aarch64_numpy1.22python3.9.____cpython variant
linux_aarch64_numpy1.23python3.11.____cpython variant
linux_aarch64_numpy1.26python3.12.____cpython variant
linux_ppc64le_numpy1.22python3.10.____cpython variant
linux_ppc64le_numpy1.22python3.8.____cpython variant
linux_ppc64le_numpy1.22python3.9.____73_pypy variant
linux_ppc64le_numpy1.22python3.9.____cpython variant
linux_ppc64le_numpy1.23python3.11.____cpython variant
linux_ppc64le_numpy1.26python3.12.____cpython variant
osx_64_numpy1.22python3.10.____cpython variant
osx_64_numpy1.22python3.8.____cpython variant
osx_64_numpy1.22python3.9.____73_pypy variant
osx_64_numpy1.22python3.9.____cpython variant
osx_64_numpy1.23python3.11.____cpython variant
osx_64_numpy1.26python3.12.____cpython variant
osx_arm64_numpy1.22python3.10.____cpython variant
osx_arm64_numpy1.22python3.8.____cpython variant
osx_arm64_numpy1.22python3.9.____cpython variant
osx_arm64_numpy1.23python3.11.____cpython variant
osx_arm64_numpy1.26python3.12.____cpython variant
win_64_numpy1.22python3.10.____cpython variant
win_64_numpy1.22python3.8.____cpython variant
win_64_numpy1.22python3.9.____73_pypy variant
win_64_numpy1.22python3.9.____cpython variant
win_64_numpy1.23python3.11.____cpython variant
win_64_numpy1.26python3.12.____cpython variant

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Installing shapely

Installing shapely from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, shapely can be installed with conda:

conda install shapely

or with mamba:

mamba install shapely

It is possible to list all of the versions of shapely available on your platform with conda:

conda search shapely --channel conda-forge

or with mamba:

mamba search shapely --channel conda-forge

Alternatively, mamba repoquery may provide more information:

# Search all versions available on your platform:
mamba repoquery search shapely --channel conda-forge

# List packages depending on `shapely`:
mamba repoquery whoneeds shapely --channel conda-forge

# List dependencies of `shapely`:
mamba repoquery depends shapely --channel conda-forge

About conda-forge

Powered by NumFOCUS

conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.

A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge anaconda.org channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.

For more information please check the conda-forge documentation.

Terminology

feedstock - the conda recipe (raw material), supporting scripts and CI configuration.

conda-smithy - the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.

conda-forge - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)

Updating shapely-feedstock

If you would like to improve the shapely recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/shapely-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.

In order to produce a uniquely identifiable distribution:

  • If the version of a package is not being increased, please add or increase the build/number.
  • If the version of a package is being increased, please remember to return the build/number back to 0.

Feedstock Maintainers

shapely-feedstock's People

Contributors

akrherz avatar basnijholt avatar conda-forge-admin avatar conda-forge-curator[bot] avatar github-actions[bot] avatar h-vetinari avatar isuruf avatar jjacobelli avatar jorisvandenbossche avatar mwtoews avatar ocefpaf avatar pelson avatar phobson avatar regro-cf-autotick-bot avatar timtroendle avatar xhochy avatar xylar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shapely-feedstock's Issues

OSError: Could not find lib geos_c.dll or load any of its variants

Issue:
When creating a new python environment via conda and attempting to import shapely, python throws the following error:

conda create -n geo1 python=3.6 shapely
>>> from shapely.geometry import shape, Point
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>

    from .base import CAP_STYLE, JOIN_STYLE
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\geometry\base.py", line 17, in <module>
    from shapely.coords import CoordinateSequence
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\coords.py", line 8, in <module>
    from shapely.geos import lgeos
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\geos.py", line 130, in <module>
    os.path.join(sys.prefix, "Library", "lib", "geos_c.dll"),
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\geos.py", line 56, in load_dll
    libname, fallbacks or []))
OSError: Could not find lib geos_c.dll or load any of its variants ['C:\\python\\miniconda3_64bit\\envs\\geo1\\Library\\lib\\geos_c.dll'].

This occurs on new versions of conda as well as old (at least the couple that I've tried).
The interesting part is that the root environment works fine, but any new environments (as created above) does not work.


Environment (conda list):
$ conda list
# packages in environment at C:\python\miniconda3_64bit\envs\geo1:
#
# Name                    Version                   Build  Channel
certifi                   2019.6.16                py36_1    conda-forge
geos                      3.7.2                he025d50_1    conda-forge
intel-openmp              2019.4                      245
libblas                   3.8.0                    12_mkl    conda-forge
libcblas                  3.8.0                    12_mkl    conda-forge
liblapack                 3.8.0                    12_mkl    conda-forge
mkl                       2019.4                      245
numpy                     1.17.2           py36hc71023c_0    conda-forge
pip                       19.2.3                   py36_0    conda-forge
python                    3.6.7             he025d50_1005    conda-forge
setuptools                41.2.0                   py36_0    conda-forge
shapely                   1.6.4           py36ha35856d_1006    conda-forge
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_0
wheel                     0.33.6                   py36_0    conda-forge
wincertstore              0.2                   py36_1002    conda-forge

Details about conda and system ( conda info ):
$ conda info
     active environment : geo1
    active env location : C:\python\miniconda3_64bit\envs\geo1
            shell level : 2
       user config file : C:\Users\michaelek\.condarc
 populated config files : C:\Users\michaelek\.condarc
          conda version : 4.7.11
    conda-build version : not installed
         python version : 3.7.3.final.0
       virtual packages : __cuda=10.1
       base environment : C:\python\miniconda3_64bit  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
                          https://conda.anaconda.org/mullenkamp/win-64
                          https://conda.anaconda.org/mullenkamp/noarch
          package cache : C:\python\miniconda3_64bit\pkgs
                          C:\Users\michaelek\.conda\pkgs
                          C:\Users\michaelek\AppData\Local\conda\conda\pkgs
       envs directories : C:\python\miniconda3_64bit\envs
                          C:\Users\michaelek\.conda\envs
                          C:\Users\michaelek\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.3 Windows/10 Windows/10.0.17134
          administrator : False
             netrc file : None
           offline mode : False

Might be similar to #45

Thanks!

Shapely install for Python 2.7

Issue:

Get this error when installed via Anaconda Navigator.
Shapely OSError: Could not find lib c or load any of its variants []

Then tried to update to 1.7.1 but Conda repository says it's dependent on Python 3, while Pypi.org shows it is compatible with Python 2.7.

Fixed both issues by using pip install Shapely==1.7.1

kenodegard commented
I can replicate this behavior with both the defaults and conda-forge channels, unfortunately this is not a conda issue but rather a problem with how the package itself is defined/built.

Please reopen this issue at ContinuumIO/anaconda-issues and/or conda-forge/shapely-feedstock.

Thanks!


Environment (conda list):
active environment : python2 active env location : /opt/anaconda3/envs/python2 shell level : 2 user config file : /Users/jeff/.condarc populated config files : /Users/jeff/.condarc conda version : 4.10.3 conda-build version : 3.21.5 python version : 3.9.7.final.0 virtual packages : __osx=10.16=0 __unix=0=0 __archspec=1=x86_64 base environment : /opt/anaconda3 (writable) conda av data dir : /opt/anaconda3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /opt/anaconda3/pkgs /Users/jeff/.conda/pkgs envs directories : /opt/anaconda3/envs /Users/jeff/.conda/envs platform : osx-64 user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Darwin/20.6.0 OSX/10.16 UID:GID : 501:20 netrc file : None offline mode : False ``` $ conda list
</details>
# packages in environment at /opt/anaconda3/envs/python2:
#
# Name                    Version                   Build  Channel
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.1                      py_0    conda-forge
backports.lzma            0.0.14           py27ha1d0bda_1    conda-forge
backports_abc             0.5                        py_1    conda-forge
basemap                   1.2.1            py27hd2746df_2    conda-forge
basemap-data-hires        1.2.2                         0    conda-forge
ca-certificates           2021.10.8            h033912b_0    conda-forge
certifi                   2019.11.28       py27h8c360ce_1    conda-forge
cycler                    0.10.0                     py_2    conda-forge
expat                     2.4.1                he49afe7_0    conda-forge
freetype                  2.10.4               h4cff582_1    conda-forge
functools32               3.2.3.2                    py_3    conda-forge
future                    0.18.2           py27h8c360ce_1    conda-forge
futures                   3.3.0            py27h8c360ce_1    conda-forge
geos                      3.8.0                h4a8c4bd_1    conda-forge
gettext                   0.19.8.1          h7937167_1005    conda-forge
jbig                      2.1               h0d85af4_2003    conda-forge
jpeg                      9d                   hbcb3906_0    conda-forge
kiwisolver                1.1.0            py27h5cd23e5_1    conda-forge
lasio                     0.27                     pypi_0    pypi
lerc                      3.0                  he49afe7_0    conda-forge
libblas                   3.9.0                8_openblas    conda-forge
libcblas                  3.9.0                8_openblas    conda-forge
libcxx                    12.0.1               habf9029_0    conda-forge
libdeflate                1.8                  h0d85af4_0    conda-forge
libffi                    3.3                  h046ec9c_2    conda-forge
libgfortran               4.0.0           7_5_0_h1a10cd1_23    conda-forge
libgfortran4              7.5.0               h1a10cd1_23    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
liblapack                 3.9.0                8_openblas    conda-forge
libopenblas               0.3.12          openmp_h63d9170_1    conda-forge
libpng                    1.6.37               h7cec526_2    conda-forge
libtiff                   4.3.0                hd146c10_2    conda-forge
libwebp-base              1.2.1                h0d85af4_0    conda-forge
libzlib                   1.2.11            h9173be1_1013    conda-forge
llvm-openmp               12.0.1               hda6cdc1_1    conda-forge
lz4-c                     1.9.3                he49afe7_1    conda-forge
matplotlib                2.2.5                h694c41f_3    conda-forge
matplotlib-base           2.2.5            py27h11da6c2_1    conda-forge
ncurses                   6.2                  h2e338ed_4    conda-forge
numpy                     1.16.5           py27hde6bac1_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openssl                   3.0.0                h0d85af4_2    conda-forge
pandas                    0.24.2           py27h86efe34_0    conda-forge
patsy                     0.5.1                      py_0    conda-forge
pillow                    6.2.1            py27h43b43f3_1    conda-forge
pip                       20.1.1             pyh9f0ad1d_0    conda-forge
proj4                     5.2.0             h6de7cb9_1006    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyproj                    1.9.6           py27h0b31af3_1002    conda-forge
pyshp                     2.1.3              pyh44b312d_0    conda-forge
python                    2.7.18               h47d645e_1    defaults
python-dateutil           2.8.1                      py_0    conda-forge
python.app                1.3              py27h89ed719_1    conda-forge
python_abi                2.7                     1_cp27m    conda-forge
pytz                      2020.1             pyh9f0ad1d_0    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
scikit-learn              0.20.3           py27hca23c92_1    conda-forge
scipy                     1.2.1            py27h7e0e109_2    conda-forge
seaborn                   0.9.0                    py27_0    defaults
setuptools                44.0.0                   py27_0    conda-forge
shapely                   1.7.1                    pypi_0    pypi
singledispatch            3.6.1              pyh44b312d_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.37.0               h23a322b_0    conda-forge
statsmodels               0.10.2           py27h3b54f70_0    conda-forge
subprocess32              3.5.4            py27h0b31af3_0    conda-forge
tk                        8.6.11               h5dbffcc_1    conda-forge
tornado                   5.1.1           py27h1de35cc_1000    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
wxpython                  4.0.4            py27hebc47a7_0    defaults
xz                        5.2.5                haf1e3a3_1    conda-forge
zlib                      1.2.11            h9173be1_1013    conda-forge
zstd                      1.5.0                h582d3a0_0    conda-forge


<br/>
Details about  <code>conda</code> and system ( <code>conda info</code> ):
<details>

$ conda info

</details>
==> /Users/jeff/.condarc <==
channels:
  - conda-forge
  - defaults

conda shapely install produces errors.

Installed:
shapely 1.6.3 py35_0 conda-forge
&
geos 3.6.2 1 conda-forge

BUT when I run:
from shapely.geometry import Point

I get:

//anaconda/lib/python3.5/site-packages/shapely/geos.py in ()
174
175 # Apply prototypes for the libgeos_c functions
--> 176 prototype(_lgeos, geos_version)
177
178 # If we have the new interface, automatically detect all function

//anaconda/lib/python3.5/site-packages/shapely/ctypes_declarations.py in prototype(lgeos, geos_version)
29 if not geos_version >= (3, 3, 0):
30 raise UnsupportedGEOSVersionError(
---> 31 "Shapely requires GEOS version 3.3.0 or newer.")
32
33 # Initialization, cleanup, version.

UnsupportedGEOSVersionError: Shapely requires GEOS version 3.3.0 or newer.

I clearly have GEOS version 3.6.2
also now have geos_c library files in my anaconda $PATH as well as /usr/local/lib (this was my initial error in building / using shapely).

On mac OSX Sierra using jupyter notebook.

I have been across the web trying to find answers, but hours later no luck. Would appreciate any guidance..

Creating a shapely shape from a list of coordinates does not work

Issue: Creating a polygon shape from list of coordinates does not work

I was trying to construct a polygon or MultiPolygon from a list of coordinates that I received in a geojson. This did not work. Instead I had to use import shape from shapely.geometry and pass into shape(geojson) the geometry section of the response for example:

Result:
res = { 'type': 'MultiPolygon', 'coordinates' : [[[[ ]]]]}

Does not work:
MultiPolygon(res[coordinates])

does work:
shape(res)

Just wanted to put this here for people struggling to create a polygon from coordinates in the future.

GEOS version should be 3.10.3 for shapely 1.8.4

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

According to shapely release notes on GitHub 1.8.4 has been built on a 3.10.3 version of geos.

However, when installing shapely=1.8.4 with conda-forge, the geos library version is 3.11.0.

I need to have the version 3.10.3 of geos on conda-forge.

Installed packages

(tympan310) C:\>conda list
# packages in environment at C:\outils\miniconda3_64\envs\tympan310:
#
# Name                    Version                   Build  Channel
blas                      1.0                         mkl
bottleneck                1.3.5           py310h2873277_0    conda-forge
brotli                    1.0.9                h8ffe710_7    conda-forge
brotli-bin                1.0.9                h8ffe710_7    conda-forge
bzip2                     1.0.8                he774522_0
ca-certificates           2022.6.15.1          h5b45459_0    conda-forge
certifi                   2022.6.15.1        pyhd8ed1ab_0    conda-forge
cgal                      4.14                 ha925a31_1    salilab
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cython                    0.29.28         py310hd77b12b_0
fonttools                 4.37.1          py310he2412df_0    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
geos                      3.11.0               h39d44d4_0    conda-forge
gmp                       5.0.1                         0    salilab
intel-openmp              2022.1.0          h57928b3_3787    conda-forge
jpeg                      9e                   h8ffe710_2    conda-forge
kiwisolver                1.4.4           py310h476a331_0    conda-forge
libblas                   3.9.0              12_win64_mkl    conda-forge
libboost                  1.67.0               hd9e427e_4
libbrotlicommon           1.0.9                h8ffe710_7    conda-forge
libbrotlidec              1.0.9                h8ffe710_7    conda-forge
libbrotlienc              1.0.9                h8ffe710_7    conda-forge
libcblas                  3.9.0              12_win64_mkl    conda-forge
libffi                    3.4.2                hd77b12b_4
liblapack                 3.9.0              12_win64_mkl    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libtiff                   4.0.10            h21b02b4_1005    conda-forge
libwebp                   1.2.4                h8ffe710_0    conda-forge
libwebp-base              1.2.4                h8ffe710_0    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
matplotlib-base           3.5.1           py310hd77b12b_1
mkl                       2021.4.0           h0e2418a_729    conda-forge
mkl-service               2.4.0           py310hcf6e17e_0    conda-forge
mpfr                      3.0.0                         0    salilab
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
numexpr                   2.8.3           py310hb57aa6b_0
numpy                     1.22.3          py310hed7ac4c_2    conda-forge
openssl                   1.1.1q               h8ffe710_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.2           py310hd77b12b_0
pillow                    9.2.0           py310hdc2b20a_1
pip                       22.1.2          py310haa95532_0
plyfile                   0.7.4              pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
python                    3.10.4               hbb2ffb3_0
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
pytz                      2022.2.1           pyhd8ed1ab_0    conda-forge
scipy                     1.7.3           py310h33db832_0    conda-forge
setuptools                63.4.1          py310haa95532_0
shapely                   1.8.4           py310h523c7d9_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.39.2               h2bbff1b_0
swig                      4.0.2                h57928b3_2    conda-forge
tbb                       2021.5.0             h2d74725_1    conda-forge
tk                        8.6.12               h2bbff1b_0
tzdata                    2022a                hda174b7_0
unicodedata2              14.0.0          py310he2412df_1    conda-forge
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wheel                     0.37.1             pyhd3eb1b0_0
wincertstore              0.2             py310haa95532_2
xlsxwriter                3.0.3              pyhd8ed1ab_0    conda-forge
xz                        5.2.5                h8cc25b3_1
zlib                      1.2.11               hbd8134f_5
zstd                      1.4.9                h6255e5f_0    conda-forge

Environment info

(tympan310) C:\>conda info

     active environment : tympan310
    active env location : C:\outils\miniconda3_64\envs\tympan310
            shell level : 2
       user config file : C:\Users\d19749\.condarc
 populated config files : C:\Users\d19749\.condarc
          conda version : 4.14.0
    conda-build version : not installed
         python version : 3.7.7.final.0
       virtual packages : __cuda=10.2=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\outils\miniconda3_64  (writable)
      conda av data dir : C:\outils\miniconda3_64\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\outils\miniconda3_64\pkgs
                          C:\Users\d19749\.conda\pkgs
                          C:\Users\d19749\AppData\Local\conda\conda\pkgs
       envs directories : C:\outils\miniconda3_64\envs
                          C:\Users\d19749\.conda\envs
                          C:\Users\d19749\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.14.0 requests/2.28.1 CPython/3.7.7 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False

ImportError: cannot import name 'Line' from 'shapely'

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
$ conda list

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

  1. Create conda environment
  2. Install geopandas in the environment
  3. Open environment in python
  4. 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:


Environment (conda list):
$ conda list


Details about conda and system ( conda info ):
$ conda info

shapely version 1.6.2 causes jupyter kernel to fail

Installation of shapely version 1.6.2 reintroduces issues that kill jupyter kernel. I think its the same issue that causes this Toblerity/Shapely/issues/416 which was resolved by conda-forge install (possibly on a new conda environment). For me on a new conda environment either python2 or python3 the conda-forge installation that defaults to version 1.6.2 causes most shapely calls to kill kernel:

from shapely import geometry

coords = [-73.99, 40.70]

geometry.Point(coords) #call to Point works

geometry.Polygon([(0, 0), (1, 1), (1, 0)]) #call to Polygon kills kernel

set up that works:

Darwin
x86_64
python 3.6.3 | packaged by conda-forge | (default, Nov 4 2017, 10:13:32)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]
shapely 1.6.2

set up that works:

Darwin
x86_64
python 3.6.3 | packaged by conda-forge | (default, Nov 4 2017, 10:13:32)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]
shapely 1.5.17.post1

(note that installing geopandas=0.3 upgrades shapely to v1.6.2 automatically)

unary_union provides wrong result

Issue:
ops.unary_union() operation fails on the following geometry: 'MULTILINESTRING ((-0.6576979014845081 1.601480154089968, -0.5760076586550748 1.594118888807711), (-0.5760076586550748 1.594118888807711, -0.4943174158256414 1.586757623525453), (-0.4943174158256414 1.586757623525453, -0.412627172996208 1.579396358243196), (-0.412627172996208 1.579396358243196, -0.3309369301667746 1.572035092960939), (-0.6698736576063997 1.466362013920959, -0.5881834147769663 1.459000748638702), (-0.5881834147769663 1.459000748638702, -0.506493171947533 1.451639483356445), (-0.506493171947533 1.451639483356445, -0.4248029291180996 1.444278218074187), (-0.4248029291180996 1.444278218074187, -0.3431126862886662 1.43691695279193), (-0.6820496602460158 1.331241138068341, -0.6003594174165824 1.323879872786084), (-0.6003594174165824 1.323879872786084, -0.518669174587149 1.316518607503827), (-0.518669174587149 1.316518607503827, -0.4369789317577156 1.30915734222157), (-0.4369789317577156 1.30915734222157, -0.3552886889282822 1.301796076939312), (-0.6942256628856115 1.19612026221595, -0.6125354200561781 1.188758996933693), (-0.6125354200561781 1.188758996933693, -0.5308451772267447 1.181397731651435), (-0.5308451772267447 1.181397731651435, -0.4491549343973113 1.174036466369178), (-0.4491549343973113 1.174036466369178, -0.3674646915678779 1.166675201086921), (-0.7064014190075235 1.061002122046715, -0.6247111761780901 1.053640856764457), (-0.6247111761780901 1.053640856764457, -0.5430209333486568 1.0462795914822), (-0.5430209333486568 1.0462795914822, -0.4613306905192234 1.038918326199943), (-0.4613306905192234 1.038918326199943, -0.37964044768979 1.031557060917686), (-0.7185774216471191 0.9258812461943232, -0.6368871788176858 0.9185199809120661), (-0.6368871788176858 0.9185199809120661, -0.5551969359882524 0.9111587156298089), (-0.5551969359882524 0.9111587156298089, -0.473506693158819 0.9037974503475517), (-0.473506693158819 0.9037974503475517, -0.3918164503293856 0.8964361850652945), (-0.7307531777690311 0.7907631060250878, -0.6490629349395978 0.7834018407428307), (-0.6490629349395978 0.7834018407428307, -0.5673726921101644 0.7760405754605735), (-0.5673726921101644 0.7760405754605735, -0.485682449280731 0.7686793101783163), (-0.485682449280731 0.7686793101783163, -0.4039922064512976 0.7613180448960591), (-0.7429291804086269 0.6556422301726965, -0.6612389375791935 0.6482809648904393), (-0.6612389375791935 0.6482809648904393, -0.5795486947497601 0.6409196996081822), (-0.5795486947497601 0.6409196996081822, -0.4978584519203267 0.6335584343259251), (-0.4978584519203267 0.6335584343259251, -0.4161682090908933 0.6261971690436678), (-0.7551051830482327 0.520521354320192, -0.6734149402187993 0.5131600890379348), (-0.6734149402187993 0.5131600890379348, -0.591724697389366 0.5057988237556776), (-0.591724697389366 0.5057988237556776, -0.5100344545599326 0.4984375584734204), (-0.5100344545599326 0.4984375584734204, -0.4283442117304992 0.4910762931911632), (-0.7672809391701243 0.3854032141511831, -0.6855906963406909 0.3780419488689258), (-0.6855906963406909 0.3780419488689258, -0.6039004535112575 0.3706806835866687), (-0.6039004535112575 0.3706806835866687, -0.5222102106818243 0.3633194183044115), (-0.5222102106818243 0.3633194183044115, -0.4405199678523908 0.3559581530221543), (-0.9306610432639912 -1.427676448810457, -0.8489708004345579 -1.435037714092715), (-0.8489708004345579 -1.435037714092715, -0.7672805576051245 -1.442398979374972), (-0.7672805576051245 -1.442398979374972, -0.6855903147756911 -1.449760244657229), (-0.6855903147756911 -1.449760244657229, -0.6039000719462577 -1.457121509939486), (-0.9184850406243956 -1.292555572958066, -0.8367947977949622 -1.299916838240323), (-0.8367947977949622 -1.299916838240323, -0.7551045549655289 -1.30727810352258), (-0.7551045549655289 -1.30727810352258, -0.6734143121360955 -1.314639368804838), (-0.6734143121360955 -1.314639368804838, -0.5917240693066621 -1.322000634087095), (-0.906309284502504 -1.157437432789057, -0.8246190416730707 -1.164798698071314), (-0.8246190416730707 -1.164798698071314, -0.7429287988436373 -1.172159963353572), (-0.7429287988436373 -1.172159963353572, -0.6612385560142039 -1.179521228635829), (-0.6612385560142039 -1.179521228635829, -0.5795483131847705 -1.186882493918086), (-0.894133281862888 -1.022316556936439, -0.8124430390334546 -1.029677822218697), (-0.8124430390334546 -1.029677822218697, -0.7307527962040212 -1.037039087500954), (-0.7307527962040212 -1.037039087500954, -0.6490625533745878 -1.044400352783211), (-0.6490625533745878 -1.044400352783211, -0.5673723105451545 -1.051761618065468), (-0.881957279223282 -0.887195681083935, -0.8002670363938487 -0.8945569463661922), (-0.8002670363938487 -0.8945569463661922, -0.7185767935644153 -0.9019182116484493), (-0.7185767935644153 -0.9019182116484493, -0.6368865507349819 -0.9092794769307064), (-0.6368865507349819 -0.9092794769307064, -0.5551963079055485 -0.9166407422129637), (-0.8697815231014007 -0.7520775409150393, -0.7880912802719673 -0.7594388061972965), (-0.7880912802719673 -0.7594388061972965, -0.7064010374425339 -0.7668000714795536), (-0.7064010374425339 -0.7668000714795536, -0.6247107946131005 -0.7741613367618108), (-0.6247107946131005 -0.7741613367618108, -0.5430205517836671 -0.781522602044068), (-0.8576055204617845 -0.6169566650624215, -0.7759152776323511 -0.6243179303446786), (-0.7759152776323511 -0.6243179303446786, -0.6942250348029178 -0.6316791956269359), (-0.6942250348029178 -0.6316791956269359, -0.6125347919734844 -0.6390404609091931), (-0.6125347919734844 -0.6390404609091931, -0.530844549144051 -0.6464017261914502), (-0.8454295178221787 -0.481835789209917, -0.7637392749927453 -0.4891970544921742), (-0.7637392749927453 -0.4891970544921742, -0.6820490321633119 -0.4965583197744314), (-0.6820490321633119 -0.4965583197744314, -0.6003587893338785 -0.5039195850566885), (-0.6003587893338785 -0.5039195850566885, -0.5186685465044452 -0.5112808503389458), (-0.8332537617002769 -0.3467176490407948, -0.7515635188708435 -0.3540789143230521), (-0.7515635188708435 -0.3540789143230521, -0.6698732760414101 -0.3614401796053092), (-0.6698732760414101 -0.3614401796053092, -0.5881830332119767 -0.3688014448875664), (-0.5881830332119767 -0.3688014448875664, -0.5064927903825434 -0.3761627101698236), (-0.8210777590606811 -0.2115967731884035, -0.7393875162312478 -0.2189580384706607), (-0.7393875162312478 -0.2189580384706607, -0.6576972734018144 -0.2263193037529179), (-0.6576972734018144 -0.2263193037529179, -0.576007030572381 -0.2336805690351751), (-0.576007030572381 -0.2336805690351751, -0.4943167877429477 -0.2410418343174323), (-0.4526959704920171 0.2208372771694233, -0.4859475131545354 0.1930830793980719), (-0.4859475131545354 0.1930830793980719, -0.5191990558170538 0.1653288816267205), (-0.5191990558170538 0.1653288816267205, -0.5524505984795721 0.137574683855369), (-0.5524505984795721 0.137574683855369, -0.5857021411420905 0.1098204860840176), (-0.7794569418097506 0.2502823382984521, -0.7517027440383682 0.2170307956359595), (-0.7517027440383682 0.2170307956359595, -0.7239485462669859 0.1837792529734669), (-0.7239485462669859 0.1837792529734669, -0.6961943484956037 0.1505277103109743), (-0.6961943484956037 0.1505277103109743, -0.6684401507242214 0.1172761676484817), (-0.4821410316210357 -0.1059236941481969, -0.5098952293924154 -0.072672151485676), (-0.5098952293924154 -0.072672151485676, -0.5376494271637952 -0.0394206088231551), (-0.5376494271637952 -0.0394206088231551, -0.5654036249351749 -0.006169066160634187), (-0.5654036249351749 -0.006169066160634187, -0.5931578227065547 0.02708247650188672), (-0.8089020029387691 -0.07647863301916814, -0.7756504602762482 -0.0487244352477884), (-0.7756504602762482 -0.0487244352477884, -0.7423989176137273 -0.02097023747640865), (-0.7423989176137273 -0.02097023747640865, -0.7091473749512065 0.006783960294971095), (-0.7091473749512065 0.006783960294971095, -0.6758958322886855 0.03453815806635084), (-0.8089020029387691 -0.07647863301916814, -0.7272117601093357 -0.08383989830142534), (-0.7272117601093357 -0.08383989830142534, -0.6455215172799024 -0.09120116358368252), (-0.6455215172799024 -0.09120116358368252, -0.563831274450469 -0.09856242886593972), (-0.563831274450469 -0.09856242886593972, -0.4821410316210357 -0.1059236941481969), (-0.7794569418097506 0.2502823382984521, -0.7868182070920052 0.168592095469047), (-0.7868182070920052 0.168592095469047, -0.7941794723742599 0.08690185263964198), (-0.7941794723742599 0.08690185263964198, -0.8015407376565145 0.005211609810236939), (-0.8015407376565145 0.005211609810236939, -0.8089020029387691 -0.07647863301916813), (-0.4526959704920171 0.2208372771694233, -0.5343862133214504 0.2281985424516805), (-0.5343862133214504 0.2281985424516805, -0.6160764561508838 0.2355598077339377), (-0.6160764561508838 0.2355598077339377, -0.6977666989803172 0.2429210730161949), (-0.6977666989803172 0.2429210730161949, -0.7794569418097506 0.2502823382984521), (-0.4821410316210357 -0.1059236941481969, -0.4747797663387811 -0.02423345131879184), (-0.4747797663387811 -0.02423345131879184, -0.4674185010565264 0.05745679151061323), (-0.4674185010565264 0.05745679151061323, -0.4600572357742717 0.1391470343400183), (-0.4600572357742717 0.1391470343400183, -0.4526959704920171 0.2208372771694234), (-0.6160758280681697 -1.592239650108722, -0.5417471029329169 -0.7673907453781521), (-0.5417471029329169 -0.7673907453781521, -0.4674183777976642 0.05745815935241749), (-0.4674183777976642 0.05745815935241749, -0.3930896526624113 0.8823070640829869), (-0.3930896526624113 0.8823070640829869, -0.3187609275271585 1.707155968813557), (-0.9428367993859033 -1.562794588979693, -0.8685080742506505 -0.7379456842491232), (-0.8685080742506505 -0.7379456842491232, -0.7941793491153977 0.08690322048144639), (-0.7941793491153977 0.08690322048144639, -0.7198506239801449 0.9117521252120158), (-0.7198506239801449 0.9117521252120158, -0.6455218988448921 1.736601029942586), (-0.9993957611019492 -1.459318228223596, -0.983057575751899 -1.460790493605932), (-0.983057575751899 -1.460790493605932, -0.966719390401849 -1.462262758988268), (-0.966719390401849 -1.462262758988268, -0.9503812050517988 -1.463735024370604), (-0.9503812050517988 -1.463735024370604, -0.9340430197017486 -1.465207289752941), (-0.7196684199292575 1.644902792245065, -0.7033302345792073 1.643430526862729), (-0.7033302345792073 1.643430526862729, -0.6869920492291572 1.641958261480392), (-0.6869920492291572 1.641958261480392, -0.6706538638791071 1.640485996098056), (-0.6706538638791071 1.640485996098056, -0.6543156785290569 1.63901373071572), (-0.859531438839926 0.09279159215271227, -1.159645638350528 0.1499009901749203), (-1.159645638350528 0.1499009901749203, -1.442851736820215 0.2644624229519199), (-1.442851736820215 0.2644624229519199, -1.698266282708604 0.4320733588688825), (-1.698266282708604 0.4320733588688825, -1.916073838255332 0.6462926036558143), (-1.998004052704932 -0.2629123844577409, -1.745408824489664 -0.09108204146443584), (-1.745408824489664 -0.09108204146443584, -1.464144705809355 0.02816774525781686), (-1.464144705809355 0.02816774525781686, -1.165020519010141 0.09025427328133792), (-1.165020519010141 0.09025427328133792, -0.8595314388399259 0.09279159215271232), (-0.7196684199292575 1.644902792245065, -1.01876983555948 1.395249987913508), (-1.01876983555948 1.395249987913508, -1.317871251189702 1.145597183581952), (-1.317871251189702 1.145597183581952, -1.616972666819924 0.8959443792503951), (-1.616972666819924 0.8959443792503951, -1.916074082450146 0.6462915749188385), (-0.9993950635108855 -1.459318408544343, -1.24904735831936 -1.160217009463332), (-1.24904735831936 -1.160217009463332, -1.498699653127834 -0.8611156103823205), (-1.498699653127834 -0.8611156103823205, -1.748351947936309 -0.5620142113013092), (-1.748351947936309 -0.5620142113013092, -1.998004242744783 -0.2629128122202979), (-0.6543156785290569 1.63901373071572, -0.7242475138222298 0.862958475598555), (-0.7242475138222298 0.862958475598555, -0.7941793491154028 0.08690322048138976), (-0.7941793491154028 0.08690322048138976, -0.8641111844085757 -0.6891520346357756), (-0.8641111844085757 -0.6891520346357756, -0.9340430197017486 -1.465207289752941), (-0.7196684199292575 1.644902792245065, -0.7896002552224304 0.8688475371278995), (-0.7896002552224304 0.8688475371278995, -0.8595320905156033 0.09279228201073431), (-0.8595320905156033 0.09279228201073431, -0.9294639258087762 -0.683262973106431), (-0.9294639258087762 -0.683262973106431, -0.9993957611019492 -1.459318228223596), (-1.008188929795388 -1.556906668802002, -0.9918509297880254 -1.558378917482751), (-0.9918509297880254 -1.558378917482751, -0.9755129297806626 -1.5598511661635), (-0.9755129297806626 -1.5598511661635, -0.9591749297732999 -1.561323414844249), (-0.9591749297732999 -1.561323414844249, -0.9428369297659371 -1.562795663524999), (-0.9993950628321178 -1.459318401011847, -1.001593529572935 -1.483715467959386), (-1.001593529572935 -1.483715467959386, -1.003791996313753 -1.508112534906924), (-1.003791996313753 -1.508112534906924, -1.00599046305457 -1.532509601854463), (-1.00599046305457 -1.532509601854463, -1.008188929795388 -1.556906668802002), (-0.7108739478844331 1.742489853107766, -0.7130724146252558 1.718092786160171), (-0.7130724146252558 1.718092786160171, -0.7152708813660785 1.693695719212575), (-0.7152708813660785 1.693695719212575, -0.7174693481069012 1.66929865226498), (-0.7174693481069012 1.66929865226498, -0.7196678148477239 1.644901585317385), (-0.6455219478549822 1.736600858384769, -0.6618599478623449 1.738073107065518), (-0.6618599478623449 1.738073107065518, -0.6781979478697077 1.739545355746267), (-0.6781979478697077 1.739545355746267, -0.6945359478770704 1.741017604427017), (-0.6945359478770704 1.741017604427017, -0.7108739478844331 1.742489853107766), (-0.6543158148182729 1.639012590594388, -0.6521173480774503 1.663409657541983), (-0.6521173480774503 1.663409657541983, -0.6499188813366276 1.687806724489578), (-0.6499188813366276 1.687806724489578, -0.6477204145958049 1.712203791437174), (-0.6477204145958049 1.712203791437174, -0.6455219478549822 1.736600858384769), (-0.9428369297659371 -1.562795663524999, -0.9406384630251196 -1.53839859657746), (-0.9406384630251196 -1.53839859657746, -0.938439996284302 -1.514001529629921), (-0.938439996284302 -1.514001529629921, -0.9362415295434844 -1.489604462682383), (-0.9362415295434844 -1.489604462682383, -0.9340430628026668 -1.465207395734844), (-0.7196684199292575 1.644902792245065, -0.7033302345792073 1.643430526862729), (-0.7033302345792073 1.643430526862729, -0.6869920492291572 1.641958261480392), (-0.6869920492291572 1.641958261480392, -0.6706538638791071 1.640485996098056), (-0.6706538638791071 1.640485996098056, -0.6543156785290569 1.63901373071572), (-0.9993957611019492 -1.459318228223596, -0.983057575751899 -1.460790493605932), (-0.983057575751899 -1.460790493605932, -0.966719390401849 -1.462262758988268), (-0.966719390401849 -1.462262758988268, -0.9503812050517988 -1.463735024370604), (-0.9503812050517988 -1.463735024370604, -0.9340430197017486 -1.465207289752941), (1.972238675020841 1.541886069483511, 1.97867976299911 1.613364819515621), (1.97867976299911 1.613364819515621, 1.985120850977379 1.68484356954773), (1.985120850977379 1.68484356954773, 1.991561938955647 1.75632231957984), (1.991561938955647 1.75632231957984, 1.998003026933916 1.827801069611949), (1.671243071408027 -1.798355452444507, 1.752933071444756 -1.805716695848246), (1.752933071444756 -1.805716695848246, 1.834623071481485 -1.813077939251984), (1.834623071481485 -1.813077939251984, 1.916313071518214 -1.820439182655723), (1.916313071518214 -1.820439182655723, 1.998003071554943 -1.827800426059461), (1.968558053318982 1.50104106946526, 1.894229307841243 0.6761919389878184), (1.894229307841243 0.6761919389878184, 1.819900562363505 -0.1486571914896235), (1.819900562363505 -0.1486571914896235, 1.745571816885766 -0.9735063219670657), (1.745571816885766 -0.9735063219670657, 1.671243071408027 -1.798355452444507))' (being split into list of linestrings)


Environment (conda list):

$ conda list

Name Version Build Channel
_libgcc_mutex 0.1 main
blas 1.0 mkl
ca-certificates 2020.6.24 0
certifi 2020.6.20 py37_0
geos 3.8.0 he6710b0_0
icu 58.2 he6710b0_3
intel-openmp 2020.1 217
krb5 1.17.1 h173b8e3_0
ld_impl_linux-64 2.33.1 h53a641e_7
libedit 3.1.20191231 h14c3975_1
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libpq 12.2 h20c2e04_0
libstdcxx-ng 9.1.0 hdf63c60_0
libxml2 2.9.10 he19cac6_1
libxslt 1.1.34 hc22bd24_0
lxml 4.5.2 py37hefd8a0e_0
mkl 2020.1 217
mkl-service 2.3.0 py37he904b0f_0
mkl_fft 1.1.0 py37h23d657b_0
mkl_random 1.1.1 py37h0573a6f_0
ncurses 6.2 he6710b0_1
numpy 1.19.1 py37hbc911f0_0
numpy-base 1.19.1 py37hfa32c7d_0
openssl 1.1.1g h7b6447c_0
pandas 1.1.0 py37he6710b0_0
pip 20.2.2 py37_0
psycopg2 2.8.5 py37h1ba5d50_0
python 3.7.7 hcff3b4d_5
python-dateutil 2.8.1 py_0
pytz 2020.1 py_0
readline 8.0 h7b6447c_0
setuptools 49.6.0 py37_0
shapely 1.7.0 py37h98ec03d_0
six 1.15.0 py_0
sqlite 3.32.3 h62c20be_0
tk 8.6.10 hbc83047_0
wheel 0.34.2 py37_0
xlrd 1.2.0 py37_0
xz 5.2.5 h7b6447c_0
zlib 1.2.11 h7b6447c_3


Details about conda and system ( conda info ):
$ conda info
active environment : vamed
    active env location : /home/gni/.conda/envs/vamed
            shell level : 1
       user config file : /home/gni/.condarc
 populated config files : 
          conda version : 4.8.3
    conda-build version : not installed
         python version : 3.8.1.final.0
       virtual packages : __glibc=2.28
       base environment : /opt/conda  (read only)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /opt/conda/pkgs
                          /home/gni/.conda/pkgs
       envs directories : /home/gni/.conda/envs
                          /opt/conda/envs
               platform : linux-64
             user-agent : conda/4.8.3 requests/2.23.0 CPython/3.8.1 Linux/4.19.0-10-amd64 debian/10 glibc/2.28
                UID:GID : 1001:1001
             netrc file : None
           offline mode : False

OSError: Could not find lib geos_c.dll or load any of its variants

This is identical to #55 because it was locked and not resolved...

Please reproduce the code exactly as shown and read the conda list output below.

When creating a new python environment via conda and attempting to import "shapely.geometry import shape, Point", python throws the following error:

conda create -n geo1 python=3.6 shapely

>>> from shapely.geometry import shape, Point
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>

    from .base import CAP_STYLE, JOIN_STYLE
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\geometry\base.py", line 17, in <module>
    from shapely.coords import CoordinateSequence
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\coords.py", line 8, in <module>
    from shapely.geos import lgeos
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\geos.py", line 130, in <module>
    os.path.join(sys.prefix, "Library", "lib", "geos_c.dll"),
  File "C:\python\miniconda3_64bit\envs\geo1\lib\site-packages\shapely\geos.py", line 56, in load_dll
    libname, fallbacks or []))
OSError: Could not find lib geos_c.dll or load any of its variants ['C:\\python\\miniconda3_64bit\\envs\\geo1\\Library\\lib\\geos_c.dll'].

This occurs on new versions of conda as well as old (at least the couple that I've tried).
The interesting part is that the root environment works fine, but any new environments (as created above) does not work.

$ conda list
# packages in environment at C:\python\miniconda3_64bit\envs\geo1:
#
# Name                    Version                   Build  Channel
certifi                   2019.6.16                py36_1    conda-forge
geos                      3.7.2                he025d50_1    conda-forge
intel-openmp              2019.4                      245
libblas                   3.8.0                    12_mkl    conda-forge
libcblas                  3.8.0                    12_mkl    conda-forge
liblapack                 3.8.0                    12_mkl    conda-forge
mkl                       2019.4                      245
numpy                     1.17.2           py36hc71023c_0    conda-forge
pip                       19.2.3                   py36_0    conda-forge
python                    3.6.7             he025d50_1005    conda-forge
setuptools                41.2.0                   py36_0    conda-forge
shapely                   1.6.4           py36ha35856d_1006    conda-forge
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_0
wheel                     0.33.6                   py36_0    conda-forge
wincertstore              0.2                   py36_1002    conda-forge

$ conda info

$ conda info
     active environment : geo1
    active env location : C:\python\miniconda3_64bit\envs\geo1
            shell level : 2
       user config file : C:\Users\michaelek\.condarc
 populated config files : C:\Users\michaelek\.condarc
          conda version : 4.7.11
    conda-build version : not installed
         python version : 3.7.3.final.0
       virtual packages : __cuda=10.1
       base environment : C:\python\miniconda3_64bit  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
                          https://conda.anaconda.org/mullenkamp/win-64
                          https://conda.anaconda.org/mullenkamp/noarch
          package cache : C:\python\miniconda3_64bit\pkgs
                          C:\Users\michaelek\.conda\pkgs
                          C:\Users\michaelek\AppData\Local\conda\conda\pkgs
       envs directories : C:\python\miniconda3_64bit\envs
                          C:\Users\michaelek\.conda\envs
                          C:\Users\michaelek\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.7.11 requests/2.22.0 CPython/3.7.3 Windows/10 Windows/10.0.17134
          administrator : False
             netrc file : None
           offline mode : False

Installing Shapely from conda-forge via Anaconda causes Anaconda environment to fail

Perhaps I'm doing something wrong but when I install shapely via the conda-forge within the Anaconda prompt the Anaconda Scripts folder gets modified and the activate.bat and deactivate.bat files get removed meaning I am no longer able to access Anaconda, conda, or anything that I've setup using it as the environment can no longer be activated.

OS: Windows 10
Anaconda Version: Anaconda3 4.4.0 64 bit with Python 3.6

After installing Anaconda I open the Anaconda Prompt and run the setup steps for shapely:

conda config --add channels conda-forge
conda install shapely

After the install finishes I can access shapely within the python console so everything seems to be setup. But when I shut down the Prompt and attempt to restart it later I get the error:

'C:\Users\<username>\AppData\Local\Continuum\Anaconda3\Scripts\activate.bat' is not recognized as an internal or external command, operable program or batch file.

Going into the scripts folder I noticed that the activate, activate.bat, deactivate, and deactivate.bat files had all been removed. So I uninstalled and reinstalled Anaconda, copied the activate/deactivate scripts into another folder, re-ran the shapely install steps, and then copied the activate/deactivate scripts back to where they belonged and my Anaconda Prompt worked fine and had access to Shapely.

Am I installing something incorrectly or perhaps going away from the normal workflow for installing conda-forge packages?

polygonize does not return any polygon with data coming from OSMnx?

Issue:
I am working on road network analysis tool.
The OSM data is first loaded via OSMnx so as to clean the network topology, and them passed as a geodataframe to shapely so as to derive the "blocks" with the polygonize method.
Thanks for your help, I have no clue why polygonize returns no polygon although I tested with different data?
Note that with OSM data read from pyrosm instead of osmnx, polygonize seems to work (polygons are found).
Here is a extract of my notebook tests:

import pandas as pd
import geopandas as gpd
from pyrosm import OSM
import shapely
from shapely.ops import polygonize
from shapely.ops import polygonize_full
import osmnx as ox
# I import OSM data for a small location in France
G = ox.graph_from_place('Saint-Antonin-sur-Bayon, France')
# data looks clean
ox.plot_graph(G,figsize=(20,20))
sasb=ox.utils_graph.graph_to_gdfs(G,nodes=False,edges=True,fill_edge_geometry=True)
result, dangles, cuts, invalids = polygonize_full(sasb.geometry)
blocks=list(result)
invalidways=list(invalids)
cutways=list(cuts)
dangleways=list(dangles)
print(len(blocks),len(dangleways),len(cutways),len(invalidways))
# here I see all the 608 edges are invalid. But when I export the geodataframe to a shapefile and open it in QGIS, the edges seem Ok
# if use polygonize instead of polygonize_full the result is empty (no polygons, ie no "blocks" found)

Environment (conda list):
As I work with pandas and geopandas in a notebook the conda list is large: ``` argon2-cffi 20.1.0 py38h7b6447c_1 anaconda async_generator 1.10 py_0 anaconda attrs 20.2.0 py_0 anaconda backcall 0.2.0 py_0 anaconda blas 1.0 mkl bleach 3.2.1 py_0 anaconda boost-cpp 1.74.0 h9359b55_0 conda-forge branca 0.4.1 py_0 conda-forge brotlipy 0.7.0 py38h1e0a361_1000 conda-forge bzip2 1.0.8 h7b6447c_0 c-ares 1.16.1 h516909a_3 conda-forge ca-certificates 2020.6.20 hecda079_0 conda-forge cairo 1.16.0 h3fc0475_1005 conda-forge certifi 2020.6.20 py38h32f6830_0 conda-forge cffi 1.14.0 py38h2e261b9_0 cfitsio 3.470 hb7c8383_2 chardet 3.0.4 py38h32f6830_1007 conda-forge click 7.1.2 py_0 click-plugins 1.1.1 py_0 cligj 0.5.0 py38_0 cryptography 3.1.1 py38h766eaa4_0 conda-forge curl 7.71.1 he644dc0_8 conda-forge cycler 0.10.0 py_2 conda-forge cykhash 1.0.2 py38h950e882_1 conda-forge cython 0.29.21 py38h950e882_0 conda-forge decorator 4.4.2 py_0 anaconda defusedxml 0.6.0 py_0 anaconda descartes 1.1.0 py_4 conda-forge entrypoints 0.3 py38_0 anaconda expat 2.2.9 he6710b0_2 fiona 1.8.17 py38h676c6b2_0 conda-forge folium 0.11.0 py_0 conda-forge fontconfig 2.13.1 h1056068_1002 conda-forge freetype 2.10.2 h5ab3b9f_0 freexl 1.0.5 h14c3975_0 gdal 3.1.2 py38hb61cb63_1 conda-forge geopandas 0.8.1 py_0 geos 3.8.1 he1b5a44_0 conda-forge geotiff 1.6.0 ha04d9d0_1 conda-forge giflib 5.2.1 h516909a_2 conda-forge glib 2.63.1 h5a9c865_0 hdf4 4.2.13 h3ca952b_2 hdf5 1.10.6 nompi_h3c11f04_101 conda-forge icu 67.1 he1b5a44_0 conda-forge idna 2.10 pyh9f0ad1d_0 conda-forge importlib-metadata 1.7.0 py38_0 anaconda importlib_metadata 1.7.0 0 anaconda intel-openmp 2020.2 254 ipykernel 5.3.4 py38h5ca1d4c_0 anaconda ipython 7.18.1 py38h5ca1d4c_0 anaconda ipython_genutils 0.2.0 py38_0 anaconda jedi 0.17.2 py38_0 anaconda jinja2 2.11.2 py_0 anaconda joblib 0.16.0 py_0 conda-forge jpeg 9d h516909a_0 conda-forge json-c 0.13.1 h1bed415_0 jsonschema 3.2.0 py38_0 anaconda jupyter_client 6.1.7 py_0 anaconda jupyter_core 4.6.3 py38_0 anaconda jupyterlab_pygments 0.1.1 py_0 anaconda kealib 1.4.13 h33137a7_1 conda-forge kiwisolver 1.2.0 py38hbf85e49_0 conda-forge krb5 1.17.1 hfafb76e_3 conda-forge lcms2 2.11 hbd6801e_0 conda-forge ld_impl_linux-64 2.35 h769bd43_9 conda-forge libcurl 7.71.1 hcdd3856_8 conda-forge libdap4 3.20.6 h1d1bd15_1 conda-forge libedit 3.1.20191231 h14c3975_1 anaconda libev 4.33 h516909a_1 conda-forge libffi 3.2.1 hf484d3e_1007 libgcc-ng 9.1.0 hdf63c60_0 anaconda libgdal 3.1.2 hb2a6f5f_1 conda-forge libgfortran-ng 7.3.0 hdf63c60_0 libiconv 1.16 h516909a_0 conda-forge libkml 1.3.0 h74f7ee3_1012 conda-forge libnetcdf 4.7.4 nompi_h84807e1_105 conda-forge libnghttp2 1.41.0 h8cfc5f6_2 conda-forge libpng 1.6.37 hbc83047_0 libpq 12.3 h5513abc_0 conda-forge libsodium 1.0.18 h7b6447c_0 anaconda libspatialindex 1.9.3 he6710b0_0 libspatialite 4.3.0a h57f1b35_1039 conda-forge libssh2 1.9.0 h1ba5d50_1 libstdcxx-ng 9.1.0 hdf63c60_0 anaconda libtiff 4.1.0 hc7e4089_6 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libwebp-base 1.1.0 h516909a_3 conda-forge libxcb 1.14 h7b6447c_0 libxml2 2.9.10 h68273f3_2 conda-forge lz4-c 1.9.2 he1b5a44_3 conda-forge markupsafe 1.1.1 py38h7b6447c_0 anaconda matplotlib 3.3.2 0 conda-forge matplotlib-base 3.3.2 py38h91b0d89_0 conda-forge mistune 0.8.4 py38h7b6447c_1000 anaconda mkl 2020.2 256 mkl-service 2.3.0 py38he904b0f_0 mkl_fft 1.2.0 py38h23d657b_0 mkl_random 1.1.1 py38h0573a6f_0 munch 2.5.0 py_0 nbclient 0.5.0 py_0 anaconda nbconvert 6.0.6 py38_0 anaconda nbformat 5.0.7 py_0 anaconda ncurses 6.2 he6710b0_1 anaconda nest-asyncio 1.4.0 py_1 anaconda networkx 2.5 py_0 conda-forge notebook 6.1.1 py38_0 anaconda numpy 1.19.1 py38hbc911f0_0 numpy-base 1.19.1 py38hfa32c7d_0 olefile 0.46 py_0 conda-forge openjpeg 2.3.1 h981e76c_3 conda-forge openssl 1.1.1h h516909a_0 conda-forge osmnx 0.16.0 pyh9f0ad1d_0 conda-forge packaging 20.4 py_0 anaconda pandas 1.1.1 py38he6710b0_0 pandoc 2.10.1 0 anaconda pandocfilters 1.4.2 py38_1 anaconda parso 0.7.0 py_0 anaconda pcre 8.44 he6710b0_0 pexpect 4.8.0 py38_0 anaconda pickleshare 0.7.5 py38_1000 anaconda pillow 7.2.0 py38h9776b28_1 conda-forge pip 20.2.2 py38_0 anaconda pixman 0.38.0 h516909a_1003 conda-forge poppler 0.89.0 h4190859_1 conda-forge poppler-data 0.4.9 0 postgresql 12.3 h8573dbc_0 conda-forge proj 7.1.0 h966b41f_1 conda-forge prometheus_client 0.8.0 py_0 anaconda prompt-toolkit 3.0.7 py_0 anaconda ptyprocess 0.6.0 py38_0 anaconda pycparser 2.20 py_2 anaconda pygeos 0.8 py38hc7361b7_0 conda-forge pygments 2.7.1 py_0 anaconda pyopenssl 19.1.0 py_1 conda-forge pyparsing 2.4.7 py_0 anaconda pyproj 2.6.1.post1 py38h8e47818_1 conda-forge pyrobuf 0.9.3 py38h950e882_0 conda-forge pyrosm 0.5.3 py38h950e882_1 conda-forge pyrsistent 0.17.3 py38h7b6447c_0 anaconda pysocks 1.7.1 py38h32f6830_1 conda-forge python 3.8.5 h1103e12_9_cpython conda-forge python-dateutil 2.8.1 py_0 anaconda python-rapidjson 0.9.1 py38he1b5a44_0 conda-forge python_abi 3.8 1_cp38 conda-forge pytz 2020.1 py_0 pyzmq 19.0.2 py38he6710b0_1 anaconda readline 8.0 he28a2e2_2 conda-forge requests 2.24.0 pyh9f0ad1d_0 conda-forge rtree 0.9.4 py38_1 scikit-learn 0.23.2 py38h0573a6f_0 scipy 1.5.2 py38h0b6359f_0 send2trash 1.5.0 py38_0 anaconda setuptools 49.6.0 py38_1 anaconda shapely 1.7.1 py38hc7361b7_0 conda-forge six 1.15.0 py_0 anaconda sqlite 3.33.0 h62c20be_0 anaconda tbb 2020.2 hc9558a2_0 conda-forge terminado 0.8.3 py38_0 anaconda testpath 0.4.4 py_0 anaconda threadpoolctl 2.1.0 pyh5ca1d4c_0 conda-forge tiledb 2.0.8 h3effe38_1 conda-forge tk 8.6.10 hbc83047_0 anaconda tornado 6.0.4 py38h7b6447c_1 anaconda traitlets 5.0.4 py38_0 anaconda tzcode 2020a h516909a_0 conda-forge urllib3 1.25.10 py_0 conda-forge wcwidth 0.2.5 py_0 anaconda webencodings 0.5.1 py38_1 anaconda wheel 0.35.1 py_0 anaconda xerces-c 3.2.3 hfe33f54_1 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.10 h516909a_0 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.12 h516909a_0 conda-forge xorg-libxext 1.3.4 h516909a_0 conda-forge xorg-libxrender 0.9.10 h516909a_1002 conda-forge xorg-renderproto 0.11.1 h14c3975_1002 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.5 h7b6447c_0 anaconda zeromq 4.3.2 he6710b0_3 anaconda zipp 3.1.0 py_0 anaconda zlib 1.2.11 h7b6447c_3 anaconda zstd 1.4.5 h6597ccf_2 conda-forge ```
``` $ conda info active environment : omi active env location : /home/patgendre/miniconda3/envs/omi shell level : 2 user config file : /home/patgendre/.condarc populated config files : conda version : 4.8.5 conda-build version : not installed python version : 3.7.6.final.0 virtual packages : __glibc=2.27 base environment : /home/patgendre/miniconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/patgendre/miniconda3/pkgs /home/patgendre/.conda/pkgs envs directories : /home/patgendre/miniconda3/envs /home/patgendre/.conda/envs platform : linux-64 user-agent : conda/4.8.5 requests/2.24.0 CPython/3.7.6 Linux/5.4.0-48-generic ubuntu/18.04.5 glibc/2.27 UID:GID : 1000:1000 netrc file : None offline mode : False ```

"Shell is not a LinearRing" on OSX

While trying to resolve this issue over in conda-forge/geopandas(shapefile is from that thread), I traced the problem to the version (1.6.3-py36_0) conda-forge is installing for shapely.

Running this from a clean Anaconda install on OSX El Capitan 10.11.6:

conda create --yes --name GEOTEST python=3.6
source activate GEOTEST
conda install --yes -c conda-forge --override-channels geopandas fiona libgdal numpy scipy libgfortran
python -c "import geopandas as gpd; div20m = gpd.read_file('cb_2016_us_division_20m.shp');"

results in repeated

Shell is not a LinearRing
Shell is not a LinearRing
Shell is not a LinearRing
Shell is not a LinearRing
Shell is not a LinearRing
IllegalArgumentException: geometries must not contain null elements

Following on from a suggestion about removing geopandas and pip installing it instead, I repeated it with other libraries as I worked through code in the debugger. I discovered that removing shapely, fiona and geopandas from conda and reinstalling them with pip enables the little one liner test to work. Ditto for code using osmnx that sent me down this rabbit hole in the first place.

conda create --yes --name GEOTEST python=3.6
source activate GEOTEST
conda install --yes -c conda-forge --override-channels geopandas fiona libgdal numpy scipy libgfortran
conda remove --yes fiona shapely geopandas
pip install fiona shapely geopandas
python -c "import geopandas as gpd; div20m = gpd.read_file('cb_2016_us_division_20m.shp');"

The versions being removed from conda:

The following packages will be REMOVED:

    fiona:     1.7.10-py36_2 conda-forge
    geopandas: 0.3.0-py36_0  conda-forge
    shapely:   1.6.3-py36_0  conda-forge

The versions being installed by pip:

Installing collected packages: fiona, shapely, geopandas
Successfully installed fiona-1.7.10.post1 geopandas-0.3.0 shapely-1.6.3

Which, uh, seems to be the same? So I'm not sure what's going on here.

Install conflicts between shapely 2, cgal, and gdal

Comment:

I have what I think is a not-crazy need to have shapely >=2, cgal and gdal all in the same conda env, but I cannot get it to resolve.

This might not be the right feedstock to ask, but I'm not sure how to get the metadata to see which of the three packages needs to be altered / re-rendered.

Here is a demonstration Dockerfile

FROM mambaorg/micromamba:1.1.0 as build-stage

RUN micromamba create --dry-run --name gdal --channel conda-forge \
    "python 3.10.*" \
    "shapely >=2.0" \
    "gdal"

RUN micromamba create --dry-run --name cgal --channel conda-forge \
    "python 3.10.*" \
    "shapely >=2.0" \
    "cgal"

RUN micromamba create --dry-run --name both --channel conda-forge \
    "python 3.10.*" \
    "shapely >=2.0" \
    "gdal" \
    "cgal"

Which sresults in an error for all versions of python

โ•ฐโ”€ docker build --no-cache -t test-gdal-cgal -f docker/test.Dockerfile .
[+] Building 19.8s (7/7) FINISHED
 => [internal] load build definition from test.Dockerfile                                                                                                                                                              0.0s
 => => transferring dockerfile: 49B                                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/mambaorg/micromamba:1.1.0                                                                                                                                                   0.0s
 => CACHED [1/4] FROM docker.io/mambaorg/micromamba:1.1.0                                                                                                                                                              0.0s
 => [2/4] RUN micromamba create --dry-run --name gdal --channel conda-forge     "python 3.10.*"     "shapely >=2.0"     "gdal"                                                                                        16.6s
 => [3/4] RUN micromamba create --dry-run --name cgal --channel conda-forge     "python 3.10.*"     "shapely >=2.0"     "cgal"                                                                                         1.4s
 => ERROR [4/4] RUN micromamba create --dry-run --name both --channel conda-forge     "python 3.10.*"     "shapely >=2.0"     "gdal"     "cgal"                                                                        1.7s
------
 > [4/4] RUN micromamba create --dry-run --name both --channel conda-forge     "python 3.10.*"     "shapely >=2.0"     "gdal"     "cgal":
#7 0.215
#7 0.215                                            __
#7 0.215           __  ______ ___  ____ _____ ___  / /_  ____ _
#7 0.215          / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
#7 0.215         / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
#7 0.215        / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
#7 0.215       /_/
#7 0.215
#7 0.216 conda-forge/linux-64                                        Using cache
#7 0.216 conda-forge/noarch                                          Using cache
#7 1.615 error    libmamba Could not solve for environment specs
#7 1.615     Encountered problems while solving:
#7 1.615       - package poppler-22.11.0-h92391eb_0 requires boost-cpp >=1.78.0,<1.78.1.0a0, but none of the providers can be installed
#7 1.615
#7 1.615     The environment can't be solved, aborting the operation
#7 1.615
#7 1.642 critical libmamba Could not solve for environment specs
------
executor failed running [/usr/local/bin/_dockerfile_shell.sh micromamba create --dry-run --name both --channel conda-forge     "python 3.10.*"     "shapely >=2.0"     "gdal"     "cgal"]: exit code: 1

shapely.speedups.disable() required to resolve polygon creation bug

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

The following code causes python to crash

Using Shapely 2.0.1 with python 3.10 on windows 10.

(ddb-api) Y:\ddb-api>python
Python 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:00:38) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
from shapely.geometry import box

b = box(0,1,1,2) 
# Crashes python

Using speedups.disable resolves issue

from shapely import speedups
from shapely.geometry import box

speedups.disable()
b = box(0,1,1,2)
# Works

Installed packages

# packages in environment at C:\Users\nbrown\Miniconda3\envs\ddb-api:
#
# Name                    Version                   Build  Channel
affine                    2.4.0              pyhd8ed1ab_0    conda-forge
aiofiles                  23.1.0             pyhd8ed1ab_1    conda-forge
alembic                   1.10.4             pyhd8ed1ab_0    conda-forge
annotated-types           0.5.0              pyhd8ed1ab_0    conda-forge
anyio                     3.7.1              pyhd8ed1ab_0    conda-forge
argon2-cffi               23.1.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py310h8d17308_3    conda-forge
asttokens                 2.2.1              pyhd8ed1ab_0    conda-forge
attrs                     23.1.0             pyh71513ae_1    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.5              pyhd8ed1ab_0    conda-forge
bcrypt                    4.0.1           py310h87d50f1_0    conda-forge
blosc                     1.21.5               hdccc3a2_0    conda-forge
boost-cpp                 1.78.0               h9f4b32c_4    conda-forge
boto3                     1.28.20            pyhd8ed1ab_0    conda-forge
botocore                  1.31.41            pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py310h8d17308_1005    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2023.7.22            h56e8100_0    conda-forge
cairo                     1.16.0            h412253b_1017    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h628cb3f_3    conda-forge
cfitsio                   4.3.0                h9b0cee5_0    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
click                     8.1.7           win_pyh7428d3b_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.7.2              pyhd8ed1ab_1    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
cryptography              41.0.3          py310h6e82f81_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
ecdsa                     0.18.0             pyhd8ed1ab_1    conda-forge
exceptiongroup            1.1.3              pyhd8ed1ab_0    conda-forge
executing                 1.2.0              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                h63175ca_1    conda-forge
fastapi                   0.103.1            pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.2               hbde0cde_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               h546665d_1    conda-forge
freexl                    1.0.6                h67ca5e6_1    conda-forge
geos                      3.12.0               h1537add_0    conda-forge
geotiff                   1.7.1               h4e61e90_11    conda-forge
gettext                   0.21.1               h5728263_0    conda-forge
gmpy2                     2.1.2           py310hf735c17_1    conda-forge
greenlet                  2.0.2           py310h00ffb61_1    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
hdf4                      4.2.15               h1334946_6    conda-forge
hdf5                      1.14.2          nompi_h73e8ff5_100    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
httpcore                  0.17.3             pyhd8ed1ab_0    conda-forge
httpx                     0.24.1             pyhd8ed1ab_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
icu                       73.2                 h63175ca_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib_resources       6.0.1              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
intel-openmp              2023.2.0         h57928b3_49496    conda-forge
ipython                   8.14.0             pyh08f2357_0    conda-forge
jedi                      0.19.0             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
jmespath                  1.0.1              pyhd8ed1ab_0    conda-forge
kealib                    1.5.1                ha10e780_5    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
lcms2                     2.15                 h3e3b177_1    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libaec                    1.0.6                h63175ca_1    conda-forge
libarchive                3.6.2                h6f8411a_1    conda-forge
libblas                   3.9.0              18_win64_mkl    conda-forge
libcblas                  3.9.0              18_win64_mkl    conda-forge
libcurl                   8.2.1                hd5e4a3a_0    conda-forge
libdeflate                1.18                 hcfcfb64_0    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libgdal                   3.7.1                hb1fd9af_9    conda-forge
libglib                   2.76.4               he8f3873_0    conda-forge
libhwloc                  2.9.2           default_haede6df_1009    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libjpeg-turbo             2.1.5.1              hcfcfb64_0    conda-forge
libkml                    1.3.0             hf2ab4e4_1015    conda-forge
liblapack                 3.9.0              18_win64_mkl    conda-forge
libnetcdf                 4.9.2           nompi_h8284064_112    conda-forge
libpng                    1.6.39               h19919ed_0    conda-forge
libpq                     15.4                 h43585b0_0    conda-forge
librttopo                 1.1.0               h92c5fdb_14    conda-forge
libspatialite             5.0.1               hc49ff46_28    conda-forge
libsqlite                 3.43.0               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libtiff                   4.5.1                h6c8260b_1    conda-forge
libwebp-base              1.3.1                hcfcfb64_0    conda-forge
libxml2                   2.11.5               hc3477c8_1    conda-forge
libzip                    1.10.1               h1d365fa_2    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              he774522_1000    conda-forge
mako                      1.2.4              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.3           py310h8d17308_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mkl                       2022.1.0           h6a75c08_874    conda-forge
mpc                       1.3.1                h4ff82f8_0    conda-forge
mpfr                      4.2.0                h64bf75a_0    conda-forge
mpir                      3.0.0             he025d50_1002    conda-forge
numpy                     1.25.2          py310hd02465a_0    conda-forge
openjpeg                  2.5.0                ha2aaf27_2    conda-forge
openssl                   3.1.2                hcfcfb64_0    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
passlib                   1.7.4              pyh9f0ad1d_0    conda-forge
pcre2                     10.40                h17e33f8_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h8ffe710_0    conda-forge
pluggy                    1.3.0              pyhd8ed1ab_0    conda-forge
poppler                   23.08.0              h45d20d0_0    conda-forge
poppler-data              0.4.12               hd8ed1ab_0    conda-forge
postgresql                15.4                 hc80876b_0    conda-forge
proj                      9.2.1                h660b3b0_0    conda-forge
prompt-toolkit            3.0.39             pyha770c72_0    conda-forge
prompt_toolkit            3.0.39               hd8ed1ab_0    conda-forge
psycopg2                  2.9.3           py310h709a2f1_2    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pyasn1                    0.4.8                      py_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydantic                  2.0.3              pyhd8ed1ab_1    conda-forge
pydantic-core             2.3.0           py310h87d50f1_0    conda-forge
pygments                  2.16.1             pyhd8ed1ab_0    conda-forge
pyopenssl                 23.2.0             pyhd8ed1ab_1    conda-forge
pyparsing                 3.1.1              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
pystac                    1.8.2              pyhd8ed1ab_0    conda-forge
pytest                    7.3.1              pyhd8ed1ab_0    conda-forge
python                    3.10.10         h4de0772_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-jose               3.3.0              pyh6c4a22f_1    conda-forge
python-multipart          0.0.6              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    3_cp310    conda-forge
pyyaml                    6.0.1           py310h8d17308_0    conda-forge
rasterio                  1.3.8           py310h29ae91d_0    conda-forge
requests                  2.29.0             pyhd8ed1ab_0    conda-forge
rsa                       4.9                pyhd8ed1ab_0    conda-forge
s3transfer                0.6.2              pyhd8ed1ab_0    conda-forge
setuptools                68.1.2             pyhd8ed1ab_0    conda-forge
shapely                   2.0.1           py310h839b4a8_2    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.10               hfb803bf_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
snuggs                    1.4.7                      py_0    conda-forge
sqlalchemy                2.0.12          py310h8d17308_0    conda-forge
sqlite                    3.43.0               hcfcfb64_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
starlette                 0.27.0             pyhd8ed1ab_0    conda-forge
tbb                       2021.10.0            h91493d7_0    conda-forge
tiledb                    2.16.3               h1ffc264_1    conda-forge
tk                        8.6.12               h8ffe710_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
traitlets                 5.9.0              pyhd8ed1ab_0    conda-forge
typing-extensions         4.7.1                hd8ed1ab_0    conda-forge
typing_extensions         4.7.1              pyha770c72_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
urllib3                   1.26.15            pyhd8ed1ab_0    conda-forge
uvicorn                   0.22.0          py310h5588dad_0    conda-forge
vc                        14.3                h64f974e_17    conda-forge
vc14_runtime              14.36.32532         hfdfe4a8_17    conda-forge
vs2015_runtime            14.36.32532         h05e6639_17    conda-forge
wcwidth                   0.2.6              pyhd8ed1ab_0    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
xerces-c                  3.2.4                h63175ca_3    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
zipp                      3.16.2             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hcfcfb64_5    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge

Environment info

active environment : ddb-api
    active env location : C:\Users\nbrown\Miniconda3\envs\ddb-api
            shell level : 2
       user config file : C:\Users\nbrown\.condarc
 populated config files : C:\Users\nbrown\.condarc
          conda version : 23.9.0
    conda-build version : not installed
         python version : 3.8.17.final.0
       virtual packages : __archspec=1=x86_64
                          __win=0=0
       base environment : C:\Users\nbrown\Miniconda3  (writable)
      conda av data dir : C:\Users\nbrown\Miniconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\nbrown\Miniconda3\pkgs
                          C:\Users\nbrown\.conda\pkgs
                          C:\Users\nbrown\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\nbrown\Miniconda3\envs
                          C:\Users\nbrown\.conda\envs
                          C:\Users\nbrown\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.9.0 requests/2.31.0 CPython/3.8.17 Windows/10 Windows/10.0.19045
          administrator : False
             netrc file : None
           offline mode : False

OSError: Could not find lib c or load any of its variants [].

Issue: I canot seem to import Line or any other when using from shapely.geometry import Line


Environment (conda list):
$ conda list

# Name                    Version                   Build  Channel
attrs                     19.1.0                     py_0    conda-forge
boost-cpp                 1.70.0               hd59e818_1    conda-forge
bzip2                     1.0.8                h01d97ff_0    conda-forge
ca-certificates           2019.6.16            hecc5488_0    conda-forge
cairo                     1.16.0            h0ab9d94_1001    conda-forge
certifi                   2019.6.16                py37_1    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
curl                      7.65.2               ha441bb4_0  
expat                     2.2.6                h0a44026_0  
fiona                     1.8.4            py37h9a122fd_0  
fontconfig                2.13.1            h1027ab8_1000    conda-forge
freetype                  2.10.0               h24853df_0    conda-forge
freexl                    1.0.5             h1de35cc_1002    conda-forge
gdal                      2.3.3            py37hbe65578_0  
geopandas                 0.5.1                      py_0    conda-forge
geos                      3.7.1             h0a44026_1000    conda-forge
gettext                   0.19.8.1          h46ab8bc_1002    conda-forge
giflib                    5.1.7                h01d97ff_1    conda-forge
glib                      2.58.3            h9d45998_1002    conda-forge
hdf4                      4.2.13            hf3c6af0_1002    conda-forge
hdf5                      1.10.4          nompi_h0cbb7df_1106    conda-forge
icu                       58.2              h0a44026_1000    conda-forge
jpeg                      9c                h1de35cc_1001    conda-forge
json-c                    0.13.1            h1de35cc_1001    conda-forge
kealib                    1.4.10            hecf890f_1003    conda-forge
krb5                      1.16.1               hddcf347_7  
libblas                   3.8.0               11_openblas    conda-forge
libcblas                  3.8.0               11_openblas    conda-forge
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                         0    conda-forge
libiconv                  1.15              h01d97ff_1005    conda-forge
libkml                    1.3.0             hed7d534_1010    conda-forge
liblapack                 3.8.0               11_openblas    conda-forge
libnetcdf                 4.6.2             h6b88ef6_1001    conda-forge
libopenblas               0.3.6                hd44dcd8_6    conda-forge
libpng                    1.6.37               h2573ce8_0    conda-forge
libpq                     11.2                 h051b688_0  
libspatialindex           1.9.0                h6de7cb9_1    conda-forge
libspatialite             4.3.0a            h0cd9627_1026    conda-forge
libssh2                   1.8.2                hcdc9a53_2    conda-forge
libtiff                   4.0.10            hd08fb8f_1003    conda-forge
libxml2                   2.9.9                hd80cff7_2    conda-forge
lz4-c                     1.8.3             h6de7cb9_1001    conda-forge
munch                     2.3.2                      py_0    conda-forge
ncurses                   6.1                  h0a44026_1  
numpy                     1.17.0           py37h6b0580a_0    conda-forge
openjpeg                  2.3.1                hc1feee7_0    conda-forge
openssl                   1.1.1c               h01d97ff_0    conda-forge
pandas                    0.25.0           py37h86efe34_0    conda-forge
pcre                      8.43                 h0a44026_0  
pip                       19.1.1                   py37_0  
pixman                    0.38.0            h01d97ff_1003    conda-forge
poppler                   0.79.0               hd5eb092_0    conda-forge
poppler-data              0.4.9                         1    conda-forge
proj4                     5.2.0             h6de7cb9_1004    conda-forge
pyproj                    1.9.6            py37h9c430a6_0  
python                    3.7.3                h359304d_0  
python-dateutil           2.8.0                      py_0    conda-forge
pytz                      2019.2                     py_0    conda-forge
readline                  7.0                  h1de35cc_5  
rtree                     0.8.3           py37h666c49c_1002    conda-forge
setuptools                41.0.1                   py37_0  
shapely                   1.6.4           py37h79c6f3e_1005    conda-forge
six                       1.12.0                py37_1000    conda-forge
sqlite                    3.29.0               ha441bb4_0  
tk                        8.6.8                ha441bb4_0  
wheel                     0.33.4                   py37_0  
xerces-c                  3.2.2             h4db8090_1003    conda-forge
xz                        5.2.4                h1de35cc_4  
zlib                      1.2.11               h1de35cc_3  
zstd                      1.4.0                ha9f0a20_0    conda-forge

Details about conda and system ( conda info ):
$ conda info
     active environment : GIS
    active env location : /Users/jacob/anaconda3/envs/GIS
            shell level : 2
       user config file : /Users/jacob/.condarc
 populated config files : /Users/jacob/.condarc
          conda version : 4.7.10
    conda-build version : 3.18.8
         python version : 3.7.3.final.0
       virtual packages : 
       base environment : /Users/jacob/anaconda3  (writable)
           channel URLs : 
                          https://conda.anaconda.org/conda-forge/
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/jacob/anaconda3/pkgs
                          /Users/jacob/.conda/pkgs
       envs directories : /Users/jacob/anaconda3/envs
                          /Users/jacob/.conda/envs
               platform : osx-64
             user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Darwin/18.7.0 OSX/10.14.6
                UID:GID : 501:20
             netrc file : None
           offline mode : False
$conda info - s
sys.version: 3.7.3 (default, Mar 27 2019, 16:54:48) 
...
sys.prefix: /Users/jacob/anaconda3
sys.executable: /Users/jacob/anaconda3/bin/python
conda location: /Users/jacob/anaconda3/lib/python3.7/site-packages/conda
conda-build: /Users/jacob/anaconda3/bin/conda-build
conda-convert: /Users/jacob/anaconda3/bin/conda-convert
conda-debug: /Users/jacob/anaconda3/bin/conda-debug
conda-develop: /Users/jacob/anaconda3/bin/conda-develop
conda-env: /Users/jacob/anaconda3/bin/conda-env
conda-index: /Users/jacob/anaconda3/bin/conda-index
conda-inspect: /Users/jacob/anaconda3/bin/conda-inspect
conda-metapackage: /Users/jacob/anaconda3/bin/conda-metapackage
conda-render: /Users/jacob/anaconda3/bin/conda-render
conda-server: /Users/jacob/anaconda3/bin/conda-server
conda-skeleton: /Users/jacob/anaconda3/bin/conda-skeleton
conda-verify: /Users/jacob/anaconda3/bin/conda-verify
user site dirs: 

CIO_TEST: <not set>
CONDA_DEFAULT_ENV: GIS
CONDA_EXE: /Users/jacob/anaconda3/bin/conda
CONDA_PREFIX: /Users/jacob/anaconda3/envs/GIS
CONDA_PREFIX_1: /Users/jacob/anaconda3
CONDA_PROMPT_MODIFIER: (GIS) 
CONDA_PYTHON_EXE: /Users/jacob/anaconda3/bin/python
CONDA_ROOT: /Users/jacob/anaconda3
CONDA_SHLVL: 2
PATH: /Users/jacob/anaconda3/bin:/Users/jacob/anaconda3/envs/GIS/bin:/Users/jacob/anaconda3/condabin:/usr/local/git/bin:/sw/bin:/usr/local/bin:/usr/local:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/Cellar/netcdf/4.6.3_1/bin:/usr/local/Cellar/mpich3/include:/usr/local/opt/python/libexec/bin:/Users/jacob/Desktop/WRF4/ncl/ncl_6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/opt/inetutils/libexec/gnubin:/usr/local/bin:/usr/local/sbin:/Users/jacob/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>

these are the steps I took before executing the aforementioned command to import Line

  1. Went into the anaconda Navigator
  2. Created an environment
  3. Installed geopandas through
    conda install -c conda-forge geopandas
  4. Opened my environment with python and with pycharm
  5. Executed the command from shapely.geometry import Line

I then get the following error code from

Python

Traceback (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 [].

From pyCharm (I used the environment I created)

from shapely.geometry import Line
Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: cannot import name 'Line' from 'shapely.geometry' (/Users/jacob/anaconda3/envs/GIS/lib/python3.7/site-packages/shapely/geometry/__init__.py)
  • I noticed that even if I used conda-forge the error messages still show them to be pointing at site-packages

  • what am I doing wrong here? should this be pointing somewhere else? If so, what do I need to do?

Hoping someone could help. Thanks!

GEOS 3.10

I was attempting to try out the new shapely release with the new geos release, but it appears that shapely has a minor pin restriction on geos 3.9.1. Is that expected?

mamba create -n gis -c conda-forge "shapely>=1.8" "geos>=3.10" 

Fails with

Encountered problems while solving:
  - package shapely-1.8.0-py37h48c49eb_0 requires geos >=3.9.1,<3.9.2.0a0, but none of the providers can be installed

OSError: Could not find lib geos_c.dll or load any of its variants

Hi there,
I am using Windows 10, PyCharm and Anaconda, which I downloaded today from the official website...
I set up an environment and was just looking at how to make a basic map using cartopy and matplotlib

For improved readability, I use pastebin for extensive stuff, such as the rror message!

https://pastebin.com/srDr9sBt

my result for `conda list`
https://pastebin.com/MjYSQx7s


It seems like the structure of my env is different from the one that is looked for, as it is looking in
C:\\Anaconda3\\envs\\Kevins_environment\\Library\\lib\\geos_c.dll
while searching for geos_c.dll finds it in
C:\Anaconda3\envs\Kevins_environment\Library\bin

I tried simply copying, but it won't work!

my result for conda info

no matter what I change - I cannot get active environment to show Kevins_environment (which it should, as I set it to be system interpreter) (I am giving you this output from PyCharm)

active environment : None
user config file : C:\Users\KW.condarc
populated config files : C:\Users\KW.condarc
conda version : 4.5.12
conda-build version : 3.17.6
python version : 3.7.1.final.0
base environment : C:\Anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/win-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/win-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/win-64
https://repo.anaconda.com/pkgs/pro/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Anaconda3\pkgs
C:\Users\KW\AppData\Local\conda\conda\pkgs
envs directories : C:\Anaconda3\envs
C:\Users\KW\AppData\Local\conda\conda\envs
C:\Users\KW.conda\envs
platform : win-64
user-agent : conda/4.5.12 requests/2.21.0 CPython/3.7.1 Windows/10 Windows/10.0.17134
administrator : False
netrc file : None
offline mode : False

when I use it via cmd it actually works fine.
this might be a configuration issue which I cannot wrap my head around?!
Can anyone help with this please?

Edit:
I just checked: When I use Spyder it works fine ...

OSError: Could not find lib c or load any of its variants []

Issue:

After executing this line from shapely.geometry import Line I get issues on this

OSError: Could not find lib c or load any of its variants [].

So, I created a new environment in anaconda and set priority to conda-forge so that I wouldn't be mixing packages from different channels as mentioned here: https://conda-forge.org/docs/user/tipsandtricks.html#how-to-fix-it

However, as I install geopandas and run this line in the interpreter,

from shapely.geometry import Line

the same error comes out.

Also, I have no other geos installed in my system via homebrew or macports

brew list

(base) Jacobs-MacBook-Pro:~ jacob$ brew list
apr		grib2		libmpc		netcdf		sqlite
apr-util	hdf5		libsodium	openssl		subversion
cmake		inetutils	libunistring	perl		szip
gcc		isl		lz4		proj		utf8proc
gdbm		jpeg		mpfr		python		wget
gettext		libidn		mpich		readline	xz
gmp		libidn2		mpich3		spatialindex	zeromq

(base) Jacobs-MacBook-Pro:~ jacob$ brew uninstall geos
Error: No such keg: /usr/local/Cellar/geos

** brew cask list **

(base) Jacobs-MacBook-Pro:~ jacob$ brew cask list
java                                     xquartz

Steps done:

  1. Create a new environment GIS
  2. Set channel priority to conda-forge
  3. installed geopandas
  4. Tried executing from shapely.geometry import Line however, I still get the same error.

Environment (conda list):
(GIS) bash-3.2$ conda list
# packages in environment at /Users/jacob/anaconda3/envs/GIS:
#
# Name                    Version                   Build  Channel
attrs                     19.1.0                     py_0    conda-forge
boost-cpp                 1.70.0               h75728bb_2    conda-forge
bzip2                     1.0.8                h01d97ff_0    conda-forge
ca-certificates           2019.6.16            hecc5488_0    conda-forge
cairo                     1.16.0            he1c11cd_1002    conda-forge
certifi                   2019.6.16                py37_1    conda-forge
cfitsio                   3.470                h389770f_1    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
curl                      7.65.3               h22ea746_0    conda-forge
expat                     2.2.5             h6de7cb9_1003    conda-forge
fiona                     1.8.6            py37h39889d8_4    conda-forge
fontconfig                2.13.1            h6b1039f_1001    conda-forge
freetype                  2.10.0               h24853df_1    conda-forge
freexl                    1.0.5             h1de35cc_1002    conda-forge
gdal                      2.4.2            py37h39889d8_4    conda-forge
geopandas                 0.5.1                      py_0    conda-forge
geos                      3.7.2                h6de7cb9_1    conda-forge
geotiff                   1.5.1                h83de174_2    conda-forge
gettext                   0.19.8.1          h46ab8bc_1002    conda-forge
giflib                    5.1.7                h01d97ff_1    conda-forge
glib                      2.58.3            h9d45998_1002    conda-forge
hdf4                      4.2.13            hf3c6af0_1002    conda-forge
hdf5                      1.10.5          nompi_h0cbb7df_1100    conda-forge
icu                       64.2                 h6de7cb9_0    conda-forge
jpeg                      9c                h1de35cc_1001    conda-forge
json-c                    0.13.1            h1de35cc_1001    conda-forge
kealib                    1.4.10            h6659575_1005    conda-forge
krb5                      1.16.3            hcfa6398_1001    conda-forge
libblas                   3.8.0               11_openblas    conda-forge
libcblas                  3.8.0               11_openblas    conda-forge
libcurl                   7.65.3               h16faf7d_0    conda-forge
libcxx                    8.0.0                         4    conda-forge
libcxxabi                 8.0.0                         4    conda-forge
libdap4                   3.20.2            hae55d67_1000    conda-forge
libedit                   3.1.20170329      hcfe32e1_1001    conda-forge
libffi                    3.2.1             h6de7cb9_1006    conda-forge
libgdal                   2.4.2                hf77bb78_4    conda-forge
libgfortran               3.0.1                         0    conda-forge
libiconv                  1.15              h01d97ff_1005    conda-forge
libkml                    1.3.0             hed7d534_1010    conda-forge
liblapack                 3.8.0               11_openblas    conda-forge
libnetcdf                 4.6.2             h1a02027_1002    conda-forge
libopenblas               0.3.6                hd44dcd8_6    conda-forge
libpng                    1.6.37               h2573ce8_0    conda-forge
libpq                     11.5                 h756f0eb_0    conda-forge
libspatialindex           1.9.0                h6de7cb9_1    conda-forge
libspatialite             4.3.0a            he369b6e_1029    conda-forge
libssh2                   1.8.2                hcdc9a53_2    conda-forge
libtiff                   4.0.10            hd08fb8f_1003    conda-forge
libxml2                   2.9.9                h12c6b28_2    conda-forge
lz4-c                     1.8.3             h6de7cb9_1001    conda-forge
munch                     2.3.2                      py_0    conda-forge
ncurses                   6.1               h0a44026_1002    conda-forge
numpy                     1.17.0           py37h6b0580a_0    conda-forge
openjpeg                  2.3.1                hc1feee7_0    conda-forge
openssl                   1.1.1c               h01d97ff_0    conda-forge
pandas                    0.25.0           py37h86efe34_0    conda-forge
pcre                      8.41              h0a44026_1003    conda-forge
pip                       19.2.1                   py37_0    conda-forge
pixman                    0.38.0            h01d97ff_1003    conda-forge
poppler                   0.67.0               hd5eb092_7    conda-forge
poppler-data              0.4.9                         1    conda-forge
postgresql                11.5                 h25afefd_0    conda-forge
proj4                     6.1.0                h2cc77ee_2    conda-forge
pyproj                    2.2.1            py37h804dea5_0    conda-forge
python                    3.7.3                h93065d6_1    conda-forge
python-dateutil           2.8.0                      py_0    conda-forge
pytz                      2019.2                     py_0    conda-forge
readline                  8.0                  hcfe32e1_0    conda-forge
rtree                     0.8.3           py37h666c49c_1002    conda-forge
setuptools                41.0.1                   py37_0    conda-forge
shapely                   1.6.4           py37h0567c5e_1006    conda-forge
six                       1.12.0                py37_1000    conda-forge
sqlite                    3.29.0               hb7d70f7_0    conda-forge
tk                        8.6.9             h2573ce8_1002    conda-forge
tzcode                    2019a             h01d97ff_1002    conda-forge
wheel                     0.33.4                   py37_0    conda-forge
xerces-c                  3.2.2             hbda6038_1004    conda-forge
xz                        5.2.4             h1de35cc_1001    conda-forge
zlib                      1.2.11            h01d97ff_1005    conda-forge
zstd                      1.4.0                ha9f0a20_0    conda-forge


Details about conda and system ( conda info ):
active environment : GIS
    active env location : /Users/jacob/anaconda3/envs/GIS
            shell level : 2
       user config file : /Users/jacob/.condarc
 populated config files : /Users/jacob/.condarc
          conda version : 4.7.10
    conda-build version : 3.18.8
         python version : 3.7.3.final.0
       virtual packages : 
       base environment : /Users/jacob/anaconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/jacob/anaconda3/pkgs
                          /Users/jacob/.conda/pkgs
       envs directories : /Users/jacob/anaconda3/envs
                          /Users/jacob/.conda/envs
               platform : osx-64
             user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Darwin/18.7.0 OSX/10.14.6
                UID:GID : 501:20
             netrc file : None
           offline mode : False


Details about conda and system ( conda info -s ):
(GIS) bash-3.2$ conda info -s
sys.version: 3.7.3 (default, Mar 27 2019, 16:54:48) 
...
sys.prefix: /Users/jacob/anaconda3
sys.executable: /Users/jacob/anaconda3/bin/python
conda location: /Users/jacob/anaconda3/lib/python3.7/site-packages/conda
conda-build: /Users/jacob/anaconda3/bin/conda-build
conda-convert: /Users/jacob/anaconda3/bin/conda-convert
conda-debug: /Users/jacob/anaconda3/bin/conda-debug
conda-develop: /Users/jacob/anaconda3/bin/conda-develop
conda-env: /Users/jacob/anaconda3/bin/conda-env
conda-index: /Users/jacob/anaconda3/bin/conda-index
conda-inspect: /Users/jacob/anaconda3/bin/conda-inspect
conda-metapackage: /Users/jacob/anaconda3/bin/conda-metapackage
conda-render: /Users/jacob/anaconda3/bin/conda-render
conda-server: /Users/jacob/anaconda3/bin/conda-server
conda-skeleton: /Users/jacob/anaconda3/bin/conda-skeleton
conda-verify: /Users/jacob/anaconda3/bin/conda-verify
user site dirs: 

CIO_TEST: <not set>
CONDA_DEFAULT_ENV: GIS
CONDA_EXE: /Users/jacob/anaconda3/bin/conda
CONDA_PREFIX: /Users/jacob/anaconda3/envs/GIS
CONDA_PREFIX_1: /Users/jacob/anaconda3
CONDA_PROMPT_MODIFIER: (GIS) 
CONDA_PYTHON_EXE: /Users/jacob/anaconda3/bin/python
CONDA_ROOT: /Users/jacob/anaconda3
CONDA_SHLVL: 2
PATH: /Users/jacob/anaconda3/bin:/Users/jacob/anaconda3/envs/GIS/bin:/Users/jacob/anaconda3/condabin:/usr/local/git/bin:/sw/bin:/usr/local/bin:/usr/local:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/Cellar/netcdf/4.6.3_1/bin:/usr/local/Cellar/mpich3/include:/usr/local/opt/python/libexec/bin:/Users/jacob/Desktop/WRF4/ncl/ncl_6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/opt/inetutils/libexec/gnubin:/usr/local/bin:/usr/local/sbin:/Users/jacob/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>


Details about cat .condarc:
`(GIS) bash-3.2$ cat .condarc
ssl_verify: true
channels:
  - conda-forge
  - defaults
channel_priority: strict`

The error from the python prompt is still the same:

from shapely.geometry import Line

Last login: Sat Aug 10 23:00:22 on ttys000
-bash: HOME: command not found
/Users/jacob/.anaconda/navigator/a.tool ; exit;
(base) Jacobs-MacBook-Pro:~ jacob$ /Users/jacob/.anaconda/navigator/a.tool ; exit;
Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 14:38:56) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from shapely.geometry import Line
Traceback (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 [].

List of files inside ../GIS/lib:

(base) Jacobs-MacBook-Pro:lib jacob$ pwd
/Users/jacob/anaconda3/envs/GIS/lib
(base) Jacobs-MacBook-Pro:lib jacob$ ls
GNU.Gettext.dll				libicui18n.dylib
Tk.icns					libicuio.64.2.dylib
Tk.tiff					libicuio.64.dylib
_int.so					libicuio.dylib
adminpack.so				libicutest.64.2.dylib
amcheck.so				libicutest.64.dylib
ascii_and_mic.so			libicutest.dylib
auth_delay.so				libicutu.64.2.dylib
auto_explain.so				libicutu.64.dylib
autoinc.so				libicutu.dylib
bloom.so				libicuuc.64.2.dylib
btree_gin.so				libicuuc.64.dylib
btree_gist.so				libicuuc.dylib
cairo					libintl.8.dylib
charset.alias				libintl.a
citext.so				libintl.dylib
cmake					libjpeg.9.dylib
cube.so					libjpeg.a
cyrillic_and_mic.so			libjpeg.dylib
dblink.so				libjson-c.4.dylib
dict_int.so				libjson-c.a
dict_snowball.so			libjson-c.dylib
dict_xsyn.so				libk5crypto.3.1.dylib
earthdistance.so			libk5crypto.3.dylib
engines-1.1				libk5crypto.dylib
euc2004_sjis2004.so			libkadm5clnt.dylib
euc_cn_and_mic.so			libkadm5clnt_mit.11.0.dylib
euc_jp_and_sjis.so			libkadm5clnt_mit.11.dylib
euc_kr_and_mic.so			libkadm5clnt_mit.dylib
euc_tw_and_big5.so			libkadm5srv.dylib
file_fdw.so				libkadm5srv_mit.11.0.dylib
fuzzystrmatch.so			libkadm5srv_mit.11.dylib
gettext					libkadm5srv_mit.dylib
girepository-1.0			libkdb5.9.0.dylib
glib-2.0				libkdb5.9.dylib
hstore.so				libkdb5.dylib
icu					libkea.1.4.10.dylib
insert_username.so			libkea.1.4.dylib
isn.so					libkea.dylib
itcl4.1.2				libkmlbase.1.3.0.dylib
krb5					libkmlbase.1.dylib
latin2_and_win1250.so			libkmlbase.dylib
latin_and_mic.so			libkmlconvenience.1.3.0.dylib
libasprintf.0.dylib			libkmlconvenience.1.dylib
libasprintf.a				libkmlconvenience.dylib
libasprintf.dylib			libkmldom.1.3.0.dylib
libblas.3.dylib				libkmldom.1.dylib
libblas.dylib				libkmldom.dylib
libboost_atomic.a			libkmlengine.1.3.0.dylib
libboost_atomic.dylib			libkmlengine.1.dylib
libboost_chrono.a			libkmlengine.dylib
libboost_chrono.dylib			libkmlregionator.1.3.0.dylib
libboost_container.a			libkmlregionator.1.dylib
libboost_container.dylib		libkmlregionator.dylib
libboost_context.a			libkmlxsd.1.3.0.dylib
libboost_context.dylib			libkmlxsd.1.dylib
libboost_contract.a			libkmlxsd.dylib
libboost_contract.dylib			libkrad.0.0.dylib
libboost_coroutine.a			libkrad.0.dylib
libboost_coroutine.dylib		libkrad.dylib
libboost_date_time.a			libkrb5.3.3.dylib
libboost_date_time.dylib		libkrb5.3.dylib
libboost_exception.a			libkrb5.dylib
libboost_fiber.a			libkrb5support.1.1.dylib
libboost_fiber.dylib			libkrb5support.1.dylib
libboost_filesystem.a			libkrb5support.dylib
libboost_filesystem.dylib		liblapack.3.dylib
libboost_graph.a			liblapack.dylib
libboost_graph.dylib			liblz4.1.8.3.dylib
libboost_iostreams.a			liblz4.1.dylib
libboost_iostreams.dylib		liblz4.a
libboost_locale.a			liblz4.dylib
libboost_locale.dylib			liblzma.5.dylib
libboost_log.a				liblzma.a
libboost_log.dylib			liblzma.dylib
libboost_log_setup.a			libmenu.6.dylib
libboost_log_setup.dylib		libmenu.a
libboost_math_c99.a			libmenu.dylib
libboost_math_c99.dylib			libmenuw.6.dylib
libboost_math_c99f.a			libmenuw.a
libboost_math_c99f.dylib		libmenuw.dylib
libboost_math_c99l.a			libmfhdf.0.dylib
libboost_math_c99l.dylib		libmfhdf.a
libboost_math_tr1.a			libmfhdf.dylib
libboost_math_tr1.dylib			libminizip.dylib
libboost_math_tr1f.a			libncurses++.a
libboost_math_tr1f.dylib		libncurses++w.a
libboost_math_tr1l.a			libncurses.6.dylib
libboost_math_tr1l.dylib		libncurses.a
libboost_prg_exec_monitor.a		libncurses.dylib
libboost_prg_exec_monitor.dylib		libncursesw.6.dylib
libboost_program_options.a		libncursesw.a
libboost_program_options.dylib		libncursesw.dylib
libboost_random.a			libnetcdf.13.dylib
libboost_random.dylib			libnetcdf.a
libboost_regex.a			libnetcdf.dylib
libboost_regex.dylib			libnetcdf.settings
libboost_serialization.a		libopenblas.0.dylib
libboost_serialization.dylib		libopenblasp-r0.3.6.dylib
libboost_stacktrace_addr2line.a		libopenjp2.2.3.1.dylib
libboost_stacktrace_addr2line.dylib	libopenjp2.7.dylib
libboost_stacktrace_basic.a		libopenjp2.a
libboost_stacktrace_basic.dylib		libopenjp2.dylib
libboost_stacktrace_noop.a		libpanel.6.dylib
libboost_stacktrace_noop.dylib		libpanel.a
libboost_system.a			libpanel.dylib
libboost_system.dylib			libpanelw.6.dylib
libboost_test_exec_monitor.a		libpanelw.a
libboost_thread.a			libpanelw.dylib
libboost_thread.dylib			libpcre.1.dylib
libboost_timer.a			libpcre.a
libboost_timer.dylib			libpcre.dylib
libboost_type_erasure.a			libpcrecpp.0.dylib
libboost_type_erasure.dylib		libpcrecpp.a
libboost_unit_test_framework.a		libpcrecpp.dylib
libboost_unit_test_framework.dylib	libpcreposix.0.dylib
libboost_wave.a				libpcreposix.a
libboost_wave.dylib			libpcreposix.dylib
libboost_wserialization.a		libpgcommon.a
libboost_wserialization.dylib		libpgfeutils.a
libbz2.1.0.8.dylib			libpgport.a
libbz2.a				libpgtypes.3.11.dylib
libbz2.dylib				libpgtypes.3.dylib
libc++.1.0.dylib			libpgtypes.a
libc++.1.dylib				libpgtypes.dylib
libc++.a				libpixman-1.0.dylib
libc++.dylib				libpixman-1.a
libc++abi.1.0.dylib			libpixman-1.dylib
libc++abi.1.dylib			libpng.a
libc++abi.a				libpng.dylib
libc++abi.dylib				libpng16.16.dylib
libc++experimental.a			libpng16.a
libc++fs.a				libpng16.dylib
libcairo-gobject.2.dylib		libpoppler-cpp.0.5.0.dylib
libcairo-gobject.a			libpoppler-cpp.0.dylib
libcairo-gobject.dylib			libpoppler-cpp.dylib
libcairo-script-interpreter.2.dylib	libpoppler-glib.8.9.0.dylib
libcairo-script-interpreter.a		libpoppler-glib.8.dylib
libcairo-script-interpreter.dylib	libpoppler-glib.dylib
libcairo.2.dylib			libpoppler.78.0.0.dylib
libcairo.a				libpoppler.78.dylib
libcairo.dylib				libpoppler.dylib
libcblas.3.dylib			libpq.5.11.dylib
libcblas.dylib				libpq.5.dylib
libcfitsio.8.3.47.dylib			libpq.a
libcfitsio.8.dylib			libpq.dylib
libcfitsio.a				libpqwalreceiver.so
libcfitsio.dylib			libproj.15.dylib
libcharset.1.dylib			libproj.a
libcharset.a				libproj.dylib
libcharset.dylib			libpython3.7m.a
libcom_err.3.0.dylib			libpython3.7m.dylib
libcom_err.3.dylib			libquadmath.0.dylib
libcom_err.dylib			libquadmath.dylib
libcrypto.1.1.dylib			libreadline.8.0.dylib
libcrypto.dylib				libreadline.8.dylib
libcurl.4.dylib				libreadline.a
libcurl.a				libreadline.dylib
libcurl.dylib				libspatialindex.5.0.0.dylib
libdap.25.dylib				libspatialindex.5.dylib
libdap.a				libspatialindex.dylib
libdap.dylib				libspatialindex_c.5.0.0.dylib
libdapclient.6.dylib			libspatialindex_c.5.dylib
libdapclient.a				libspatialindex_c.dylib
libdapclient.dylib			libspatialite.7.dylib
libdapserver.7.dylib			libspatialite.dylib
libdapserver.a				libsqlite3.0.dylib
libdapserver.dylib			libsqlite3.a
libdf.0.dylib				libsqlite3.dylib
libdf.a					libssh2.1.0.1.dylib
libdf.dylib				libssh2.1.dylib
libecpg.6.11.dylib			libssh2.a
libecpg.6.dylib				libssh2.dylib
libecpg.a				libssl.1.1.dylib
libecpg.dylib				libssl.dylib
libecpg_compat.3.11.dylib		libtcl8.6.dylib
libecpg_compat.3.dylib			libtclstub8.6.a
libecpg_compat.a			libtest-types.a
libecpg_compat.dylib			libtiff.5.dylib
libedit.0.dylib				libtiff.a
libedit.a				libtiff.dylib
libedit.dylib				libtiffxx.5.dylib
libexpat.1.6.7.dylib			libtiffxx.a
libexpat.1.dylib			libtiffxx.dylib
libexpat.a				libtinfo.6.dylib
libexpat.dylib				libtinfo.a
libffi.6.dylib				libtinfo.dylib
libffi.a				libtinfow.6.dylib
libffi.dylib				libtinfow.a
libfontconfig.1.dylib			libtinfow.dylib
libfontconfig.a				libtk8.6.dylib
libfontconfig.dylib			libtkstub8.6.a
libform.6.dylib				libtz.a
libform.a				liburiparser.dylib
libform.dylib				libverto.0.0.dylib
libformw.6.dylib			libverto.0.dylib
libformw.a				libverto.dylib
libformw.dylib				libxerces-c-3.2.dylib
libfreetype.6.dylib			libxerces-c.dylib
libfreetype.a				libxml2.2.dylib
libfreetype.dylib			libxml2.dylib
libfreexl.1.dylib			libz.1.2.11.dylib
libfreexl.a				libz.1.dylib
libfreexl.dylib				libz.a
libgcc_s.1.dylib			libz.dylib
libgcc_s_ppc64.1.dylib			libzstd.1.4.0.dylib
libgcc_s_x86_64.1.dylib			libzstd.1.dylib
libgdal.20.dylib			libzstd.a
libgdal.a				libzstd.dylib
libgdal.dylib				lo.so
libgeos-3.7.2.dylib			ltree.so
libgeos.dylib				mod_spatialite.7.so
libgeos_c.1.dylib			mod_spatialite.so
libgeos_c.dylib				moddatetime.so
libgeotiff.5.0.0.dylib			openjpeg-2.3
libgeotiff.5.dylib			pageinspect.so
libgeotiff.dylib			passwordcheck.so
libgettextlib-0.19.8.1.dylib		pg_buffercache.so
libgettextlib.dylib			pg_freespacemap.so
libgettextpo.0.dylib			pg_prewarm.so
libgettextpo.a				pg_stat_statements.so
libgettextpo.dylib			pg_trgm.so
libgettextsrc-0.19.8.1.dylib		pg_visibility.so
libgettextsrc.dylib			pgcrypto.so
libgfortran.3.dylib			pgoutput.so
libgfortran.dylib			pgrowlocks.so
libgif.a				pgstattuple.so
libgif.so				pgxml.so
libgif.so.7				pgxs
libgif.so.7.1.0				pkgconfig
libgio-2.0.0.dylib			plpgsql.so
libgio-2.0.dylib			postgres_fdw.so
libglib-2.0.0.dylib			python3.7
libglib-2.0.dylib			refint.so
libgmodule-2.0.0.dylib			seg.so
libgmodule-2.0.dylib			sqlite3.25.3
libgobject-2.0.0.dylib			sslinfo.so
libgobject-2.0.dylib			tablefunc.so
libgomp.1.dylib				tcl8
libgomp.dylib				tcl8.6
libgssapi_krb5.2.2.dylib		tclConfig.sh
libgssapi_krb5.2.dylib			tclooConfig.sh
libgssapi_krb5.dylib			tcn.so
libgssrpc.4.2.dylib			tdbc1.1.0
libgssrpc.4.dylib			tdbcmysql1.1.0
libgssrpc.dylib				tdbcodbc1.1.0
libgthread-2.0.0.dylib			tdbcpostgres1.1.0
libgthread-2.0.dylib			terminfo
libhdf4.settings			terminfo.c~
libhdf5.103.dylib			test_decoding.so
libhdf5.a				thread2.8.4
libhdf5.dylib				timetravel.so
libhdf5.settings			tk8.6
libhdf5_cpp.103.dylib			tkConfig.sh
libhdf5_cpp.a				tsm_system_rows.so
libhdf5_cpp.dylib			tsm_system_time.so
libhdf5_fortran.a			unaccent.so
libhdf5_hl.100.dylib			utf8_and_ascii.so
libhdf5_hl.a				utf8_and_big5.so
libhdf5_hl.dylib			utf8_and_cyrillic.so
libhdf5_hl_cpp.100.dylib		utf8_and_euc2004.so
libhdf5_hl_cpp.a			utf8_and_euc_cn.so
libhdf5_hl_cpp.dylib			utf8_and_euc_jp.so
libhdf5_hl_fortran.a			utf8_and_euc_kr.so
libhdf5hl_fortran.a			utf8_and_euc_tw.so
libhistory.8.0.dylib			utf8_and_gb18030.so
libhistory.8.dylib			utf8_and_gbk.so
libhistory.a				utf8_and_iso8859.so
libhistory.dylib			utf8_and_iso8859_1.so
libiconv.2.dylib			utf8_and_johab.so
libiconv.a				utf8_and_sjis.so
libiconv.dylib				utf8_and_sjis2004.so
libicudata.64.2.dylib			utf8_and_uhc.so
libicudata.64.dylib			utf8_and_win.so
libicudata.dylib			uuid-ossp.so
libicui18n.64.2.dylib			xml2Conf.sh
libicui18n.64.dylib

I created a new environment and set conda-forge to priority and set this conda config --set channel_priority strict. I am not sure why this is still happening.

I also made sure that there were no other geos versions installed in my system.

It seems that a lot of osx users come across this problem.

main branch build failures on osx_arm64_numpy1.21python3.10.____cpython

Comment:

#114 was merged with a failing build that was hoped to be transient. I have watched the subsequent main branch builds and now restarted osx_arm64_numpy1.21python3.10.____cpython three times and each has failed :(

/Users/runner/miniforge3/conda-bld/shapely_1666913935823/_build_env/etc/conda/activate.d/activate_z-cross-python_osx-arm64.sh: line 1: No such file or directory

Will boggle/google around on this! Well, then, that did not take long conda-forge/cross-python-feedstock#61

lgeos import error

On Mac with Python 3.5:

$ conda config --add channels conda-forge
$ conda install --yes gdal numpy six requests geopandas pillow celery psycopg2 geoalchemy2
$ python -c "from shapely.geos import lgeos"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/rdchlads/anaconda3/envs/gaia/lib/python3.5/site-packages/shapely/geos.py", line 72, in <module>
    free = load_dll('c').free
  File "/Users/rdchlads/anaconda3/envs/gaia/lib/python3.5/site-packages/shapely/geos.py", line 61, in load_dll
    libname, fallbacks or []))
OSError: Could not find lib c or load any of its variants [].

Conda install of shapely fails on Mac OSx

Issue:

After installing shapely, I have an error when I run:

from shapely import geos

The error is:

    File "<stdin>", line 1, in <module> 
    File "/Users/pradal/miniconda3/envs/shapeely/lib/python3.8/site-packages/shapely/geos.py", line 113, in <module> 
        free = load_dll('c').free 
    File "/Users/pradal/miniconda3/envs/shapeely/lib/python3.8/site-packages/shapely/geos.py", line 54, in load_dll 
        raise OSError( 
OSError: Could not find lib c or load any of its variants [].

conda install libcxx but not libc
Everything works if I change (in geos.py, line 113)

free = load_dll('c').free

by

free = load_dll('cxx').free


Environment (conda list):
$ conda list
# Name                    Version                   Build  Channel
blas                      1.0                         mkl
ca-certificates           2020.1.1                      0
certifi                   2019.11.28               py38_1
geos                      3.7.1                h0a44026_0
intel-openmp              2019.4                      233
libcxx                    4.0.1                hcfea43d_1
libcxxabi                 4.0.1                hcfea43d_1
libedit                   3.1.20181209         hb402a30_0
libffi                    3.2.1                h475c297_4
libgfortran               3.0.1                h93005f0_2
mkl                       2019.4                      233
mkl-service               2.3.0            py38hfbe908c_0
mkl_fft                   1.0.15           py38h5e564d8_0
mkl_random                1.1.0            py38h6440ff4_0
ncurses                   6.2                  h0a44026_0
numpy                     1.18.1           py38h7241aed_0
numpy-base                1.18.1           py38h6575580_1
openssl                   1.1.1f               h1de35cc_0
pip                       20.0.2                   py38_1
python                    3.8.2                hc70fcce_0
readline                  8.0                  h1de35cc_0
setuptools                46.1.3                   py38_0
shapely                   1.6.4            py38he8793f5_0
six                       1.14.0                   py38_0
sqlite                    3.31.1               ha441bb4_0
tk                        8.6.8                ha441bb4_0
wheel                     0.34.2                   py38_0
xz                        5.2.4                h1de35cc_4
zlib                      1.2.11               h1de35cc_3


Details about conda and system ( conda info ):
$ conda info
    active environment : shapely
    active env location : /Users/pradal/miniconda3/envs/shapely
            shell level : 2
       user config file : /Users/pradal/.condarc
 populated config files :
          conda version : 4.8.1
    conda-build version : not installed
         python version : 3.7.4.final.0
       virtual packages : __osx=10.15.1
       base environment : /Users/pradal/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/pradal/miniconda3/pkgs
                          /Users/pradal/.conda/pkgs
       envs directories : /Users/pradal/miniconda3/envs
                          /Users/pradal/.conda/envs
               platform : osx-64
             user-agent : conda/4.8.1 requests/2.22.0 CPython/3.7.4 Darwin/19.0.0 OSX/10.15.1
                UID:GID : 501:20
             netrc file : None
           offline mode : False

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.