conda-forge / shapely-feedstock

A conda-smithy repository for shapely.
BSD 3-Clause "New" or "Revised" License
9 stars 20 forks source link

GEOS version should be 3.10.3 for shapely 1.8.4 #109

Closed Jiunixo closed 2 years ago

Jiunixo commented 2 years ago

Solution to issue cannot be found in 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
ocefpaf commented 2 years ago

You are mixing channel there and makes debugging hard on our side. However, wheels and other binaries can be built with different dependencies and, as long as all the tests pass and the results are the same, or the differences are expected and documented, there isn't any real issue.

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

Why? Is there some specific functionality missing or test that is failing?

jorisvandenbossche commented 2 years ago

And if you need GEOS 3.10, you can install shapely with GEOS 3.10.3 by pinning GEOS: conda install shapely geos=3.10.3. This will give shapely 1.8.2 and not 1.8.4, but that's only a small difference.

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

Theose notes say "Wheels for 1.8.4 published on PyPI include GEOS 3.10.3.", so that is is about wheels built by shapely itself, not about conda-forge.

Jiunixo commented 2 years ago

Thank you very much for your quick feed-back.

When we install shapely 1.8.4 with pip on our local dev environment, GEOS 3.10.3 is installed and all our unit tests pass. Our pipeline on appveyor uses conda to install all the dependencies and we have there shapely 1.8.4 and GEOS 3.11.0 installed. One test fails repeatedly.

I'm testing the advice of pinning GEOS to 3.10.3 thus installing shapely 1.8.2. I hope it will work and workaround this issue.

Shapely uses C/C++ function of geos dll, so in my opinion, it is important for non regression that one specific version of shapely is released and qualified with one specific version of geos.

jorisvandenbossche commented 2 years ago

Shapely uses C/C++ function of geos dll, so in my opinion, it is important for non regression that one specific version of shapely is released and qualified with one specific version of geos.

Shapely supports a range of GEOS versions (currently 3.6 - 3.11). So if you want to use shapely with a specific GEOS version, you can install that GEOS version and then install Shapely from source (eg with pip's --no-binary)

akrherz commented 2 years ago

@Jiunixo I think you are describing shapely + geos 3.11 issues like this: shapely/shapely#1436 ?

Jiunixo commented 2 years ago

I solve the problem by installing shapely with PyPi in conda environment on appveyor machine. pip install shapely==1.8.4

@akrherz , yes it might be this kind of issue. Unfortunately I have not been able to reproduce the behaviour locally.

Thank you very much again for advices and help. For me the issue can be closed.

skupr-anaconda commented 2 years ago

shapely 1.8.4 requires GEOS >=3.3, see https://github.com/shapely/shapely/blob/7c63580a44af8d1db7b5e9805c659aeebddaf8d3/setup.py#L138

xylar commented 2 years ago

I'm closing this issue. We cannot build every version of shapely with every version of geos that it supports. Instead, conda-forge works hard to keep compatible versions of libraries like geos across all its ecosystem of packages.