Skip to content

Add numpy 2.5 compatibility #655

Description

@jypeter

I guess this is some kind of follow-up of #647 , as requested by @thebaptiste

Note: I'm using conda and everything (including conda) from conda-forge

I have tried several times this week to add basemap to a fairly complex (but up-to-date) Python environment, and had to kill conda because nothing happened. That is conda install was not moving anymore, but the conda process was using more and more resources. This time, I killed a 100% CPU conda process using 13 Gb after 200 minutes

So I tried to install only basemap, with conda create -n basemap_test basemap in order to check I could install it at all! This worked perfectly and quickly, but I ended up with numpy 2.3.5 (not numpy 2.4)

If conda was not working with my complex environment, I thought I would use mamba again, which I have not done since mamba became the default solver of conda. And I quickly got a result (no mamba deadlock or guru meditation)!! Trouble is that mamba wants to downgrade the installed numpy, which is a no-go. And also wants to downgrade pyshp (and packaging) but I don't know anything about these

  Package                     Version  Build            Channel           Size
────────────────────────────────────────────────────────────────────────────────
  Install:
────────────────────────────────────────────────────────────────────────────────

  + basemap                     2.0.0  py312h8d133b9_5  conda-forge      189kB
  + basemap-data                2.0.0  basemap_0        conda-forge     Cached

  Downgrade:
────────────────────────────────────────────────────────────────────────────────

  - numpy                       2.5.3  py312he827f4e_0  conda-forge     Cached
  + numpy                       2.3.5  py312h33ff503_1  conda-forge        9MB
  - numpy-typing-compat  20260602.2.5  pyhb860519_1     conda-forge     Cached
  + numpy-typing-compat  20260602.2.3  pyhc46ce56_1     conda-forge       13kB
  - packaging                    26.3  pyhc364b38_0     conda-forge     Cached
  + packaging                    25.0  pyh29332c3_1     conda-forge     Cached
  - pyshp                       3.1.6  pyhcf101f3_0     conda-forge     Cached
  + pyshp                       2.3.1  pyhd8ed1ab_1     conda-forge     Cached

  Summary:

  Install: 2 packages
  Downgrade: 4 packages

Any thoughts on that, by somebody who knows about packages dependencies and constraints?

Note that the environment where I installed only basemap has pyshp 2.3.1. Could the problem come from pyshp?

Full list of the basemap-only environment below

I have asked the student who wanted basemap to use cartopy instead, so this is not a blocking problem. But it would be nice to still be able to install basemap in a recent environment, if it does not require too much work from the people in charge :-)

(base) $ conda list -n basemap_test
# packages in environment at /home/share/unix_files/cdat/miniconda3_2024-03/envs/basemap_test:
#
# Name                     Version          Build                 Channel
_openmp_mutex              4.5              20_gnu                conda-forge
basemap                    2.0.0            py314h9620088_5       conda-forge
basemap-data               2.0.0            basemap_0             conda-forge
brotli                     1.2.0            h505cf86_4            conda-forge
brotli-bin                 1.2.0            h9908984_4            conda-forge
bzip2                      1.0.8            hda65f42_10           conda-forge
c-ares                     1.34.8           hebe6cf0_2            conda-forge
ca-certificates            2026.7.22        hbd8a1cb_0            conda-forge
certifi                    2026.7.22        pyhd8ed1ab_0          conda-forge
contourpy                  1.4.0            py314h5383ef5_1       conda-forge
cycler                     0.12.1           pyhcf101f3_2          conda-forge
fonttools                  4.66.0           py314hd42368d_0       conda-forge
freetype                   2.14.3           ha770c72_2            conda-forge
geos                       3.14.1           h55b0958_0            conda-forge
icu                        78.3             py310h44b86e0_2       conda-forge
keyutils                   1.6.3            h7cc23a3_1            conda-forge
kiwisolver                 1.5.1            py314h5383ef5_3       conda-forge
krb5                       1.22.2           hbc21106_2            conda-forge
lcms2                      2.19.1           h9073bf1_3            conda-forge
ld_impl_linux-64           2.46.1           default_hbd61a6d_102  conda-forge
lerc                       4.2.0            hdb68285_0            conda-forge
libblas                    3.11.0           11_h4a7cf45_openblas  conda-forge
libbrotlicommon            1.2.0            h39a168f_4            conda-forge
libbrotlidec               1.2.0            ha411449_4            conda-forge
libbrotlienc               1.2.0            h018ffa1_4            conda-forge
libcblas                   3.11.0           11_h0358290_openblas  conda-forge
libcurl                    8.22.0           ha042cf0_0            conda-forge
libdeflate                 1.25             hd45a770_1            conda-forge
libedit                    3.1.20250104     pl5321h373387f_1      conda-forge
libev                      4.33             h280c20c_3            conda-forge
libexpat                   2.8.4            hd2095e1_0            conda-forge
libffi                     3.7.0            h81df57d_1            conda-forge
libfreetype                2.14.3           ha770c72_2            conda-forge
libfreetype6               2.14.3           h5e6c136_2            conda-forge
libgcc                     16.2.0           ha9f2e26_7            conda-forge
libgcc-ng                  16.2.0           h69a702a_7            conda-forge
libgfortran                16.2.0           h69a702a_7            conda-forge
libgfortran5               16.2.0           h6b99dfc_7            conda-forge
libgomp                    16.2.0           he0feb66_7            conda-forge
libjpeg-turbo              3.2.0            hb03c661_1            conda-forge
liblapack                  3.11.0           11_h47877c9_openblas  conda-forge
liblzma                    5.8.3            hb03c661_1            conda-forge
libmpdec                   4.0.0            hb03c661_2            conda-forge
libnghttp2                 1.68.1           h74cf4be_1            conda-forge
libopenblas                0.3.34           pthreads_hf13c14d_2   conda-forge
libpng                     1.6.58           h922cc85_1            conda-forge
libpsl                     0.23.1           hd9e3e90_1            conda-forge
libpython                  3.14.7           hdc7f604_106_cp314    conda-forge
libsqlite                  3.53.4           h13e7031_1            conda-forge
libssh2                    1.11.1           h6154650_1            conda-forge
libstdcxx                  16.2.0           h934c35e_7            conda-forge
libstdcxx-ng               16.2.0           hdf11a46_7            conda-forge
libtiff                    4.7.2            hcc2c06a_1            conda-forge
libuuid                    2.42.4           hcfc3c73_0            conda-forge
libwebp-base               1.6.0            hd42ef1d_1            conda-forge
libxcb                     1.17.0           hb83e432_2            conda-forge
libzlib                    1.3.2            h25fd6f3_3            conda-forge
matplotlib-base            3.10.9           py314h1194b4b_0       conda-forge
munkres                    1.1.4            pyhd8ed1ab_1          conda-forge
ncurses                    6.6              hdb14827_1            conda-forge
numpy                      2.3.5            py314h2b28147_1       conda-forge
openjpeg                   2.5.4            heb1ab33_2            conda-forge
openssl                    3.6.4            h781a0a9_0            conda-forge
packaging                  25.0             pyh29332c3_1          conda-forge
pillow                     12.3.0           py314h50bfbbb_4       conda-forge
pip                        26.2.1           pyh145f28c_0          conda-forge
proj                       9.8.1            he0df7b0_0            conda-forge
pthread-stubs              0.4              h7cc23a3_1004         conda-forge
pyparsing                  3.3.3            pyh5ded981_0          conda-forge
pyproj                     3.7.2            py314hf1f854a_5       conda-forge
pyshp                      2.3.1            pyhd8ed1ab_1          conda-forge
python                     3.14.7           hcd007b5_106_cp314    conda-forge
python-dateutil            2.9.0.post0      pyhe01879c_2          conda-forge
python_abi                 3.14             9_cp314               conda-forge
qhull                      2020.2           h434a139_5            conda-forge
readline                   8.3              hd6e31c0_1            conda-forge
six                        1.17.0           pyhe01879c_1          conda-forge
sqlite                     3.53.4           h9ffa6c4_1            conda-forge
tk                         8.6.13           noxft_h1df4ec4_4      conda-forge
tzdata                     2026c            h151e31d_0            conda-forge
xorg-libxau                1.0.12           h7cc23a3_2            conda-forge
xorg-libxdmcp              1.1.5            h7cc23a3_2            conda-forge
zlib-ng                    2.3.3            hce19668_1            conda-forge
zstd                       1.5.7            hb78ec9c_7            conda-forge

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions