Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyPI release pulls numpy 2.0.0rc1 for python 3.12 #327

Open
anissa111 opened this issue Apr 22, 2024 · 4 comments
Open

PyPI release pulls numpy 2.0.0rc1 for python 3.12 #327

anissa111 opened this issue Apr 22, 2024 · 4 comments

Comments

@anissa111
Copy link

anissa111 commented Apr 22, 2024

Hi folks,

I'm seeing something a bit strange on geocat-comp logs. For python 3.12 only, cftime seems to be pulling the numpy release candidate by default.

From NCAR/geocat-comp#598:

For python 3.11, cftime pulls numpy>1.13.3 (log)

Collecting numpy>1.13.3 (from cftime->geocat-comp)
Downloading numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)

For python 3.12, though (log):

Collecting numpy>=1.26.0b1 (from cftime->geocat-comp)
Downloading numpy-2.0.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)
@anissa111 anissa111 changed the title PyPI release pulls numpy 2.0.0rc1 PyPI release pulls numpy 2.0.0rc1 for python 3.12 Apr 22, 2024
@ocefpaf
Copy link
Contributor

ocefpaf commented Apr 22, 2024

Pip should not install a pre-release candidate without explicitly asked to. Maybe you are hitting this issue: pypa/pip#7579

@anissa111
Copy link
Author

Right, but the workflow of our actions haven't changed.

Locally (mac-os) on a fresh environment, here's what I see.

(base) ➜  ~ conda create -n temp-cftime python=3.12
Retrieving notices: ...working... done
Channels:
 - conda-forge
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
    current version: 24.1.1
    latest version: 24.3.0

Please update conda by running

    $ conda update -n base -c conda-forge conda



## Package Plan ##

  environment location: /Users/anissaz/miniconda3/envs/temp-cftime

  added / updated specs:
    - python=3.12


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    libsqlite-3.45.3           |       h091b4b1_0         805 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         805 KB

The following NEW packages will be INSTALLED:

  bzip2              conda-forge/osx-arm64::bzip2-1.0.8-h93a5062_5
  ca-certificates    conda-forge/osx-arm64::ca-certificates-2024.2.2-hf0a4a13_0
  libexpat           conda-forge/osx-arm64::libexpat-2.6.2-hebf3989_0
  libffi             conda-forge/osx-arm64::libffi-3.4.2-h3422bc3_5
  libsqlite          conda-forge/osx-arm64::libsqlite-3.45.3-h091b4b1_0
  libzlib            conda-forge/osx-arm64::libzlib-1.2.13-h53f4e23_5
  ncurses            conda-forge/osx-arm64::ncurses-6.4.20240210-h078ce10_0
  openssl            conda-forge/osx-arm64::openssl-3.2.1-h0d3ecfb_1
  pip                conda-forge/noarch::pip-24.0-pyhd8ed1ab_0
  python             conda-forge/osx-arm64::python-3.12.3-h4a7b5fc_0_cpython
  readline           conda-forge/osx-arm64::readline-8.2-h92ec313_1
  setuptools         conda-forge/noarch::setuptools-69.5.1-pyhd8ed1ab_0
  tk                 conda-forge/osx-arm64::tk-8.6.13-h5083fa2_1
  tzdata             conda-forge/noarch::tzdata-2024a-h0c530f3_0
  wheel              conda-forge/noarch::wheel-0.43.0-pyhd8ed1ab_1
  xz                 conda-forge/osx-arm64::xz-5.2.6-h57fd34a_0


Proceed ([y]/n)?


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate temp-cftime
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) ➜  ~ conda activate temp-cftime
(temp-cftime) ➜  ~ pip install cftime
Collecting cftime
  Using cached cftime-1.6.3-cp312-cp312-macosx_11_0_arm64.whl.metadata (8.6 kB)
Collecting numpy>=1.26.0b1 (from cftime)
  Downloading numpy-2.0.0rc1-cp312-cp312-macosx_14_0_arm64.whl.metadata (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.9/60.9 kB 580.7 kB/s eta 0:00:00
Using cached cftime-1.6.3-cp312-cp312-macosx_11_0_arm64.whl (221 kB)
Downloading numpy-2.0.0rc1-cp312-cp312-macosx_14_0_arm64.whl (5.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.0/5.0 MB 457.8 kB/s eta 0:00:00
Installing collected packages: numpy, cftime
Successfully installed cftime-1.6.3 numpy-2.0.0rc1

@ocefpaf
Copy link
Contributor

ocefpaf commented Apr 22, 2024

Right, but the workflow of our actions haven't changed.

Yep. That is why I believe you are hitting that bug I mentioned above.

@valeriupredoi
Copy link

unless you are specifically testing for the installation of cftime from PyPI inside a barebones conda env, I'd go with installing cftime from conda-forge - always a lot more consistent a process when inside an already-built conda env, plus you don't run into pip-related discontinuities, and wheel-building issues 👍 @ocefpaf great pointer to that issue, cheers! I came here to see if there's any new release that includes #319 and I leave with yet another useful bit of info 🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants