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

[BUG] Version 1.4.1 fails to build with Python 3.8 #461

Closed
GergelyKalmar opened this issue Oct 14, 2024 · 3 comments
Closed

[BUG] Version 1.4.1 fails to build with Python 3.8 #461

GergelyKalmar opened this issue Oct 14, 2024 · 3 comments
Labels

Comments

@GergelyKalmar
Copy link

Describe the bug
I'm seeing the following error when installing Bottleneck as part of a pandas[performance] install:

Collecting bottleneck>=1.3.2 (from pandas[performance]~=2.0->-r requirements/core.txt (line 2))
  Using cached bottleneck-1.4.1.tar.gz (103 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Collecting setuptools
        Using cached setuptools-75.1.0-py3-none-any.whl.metadata (6.9 kB)
      Collecting versioneer
        Using cached versioneer-0.29-py3-none-any.whl.metadata (16 kB)
      Collecting wheel
        Using cached wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB)
      ERROR: Ignored the following versions that require a different python version: 1.25.0 Requires-Python >=3.9; 1.25.1 Requires-Python >=3.9; 1.25.2 Requires-Python >=3.9; 1.26.0 Requires-Python <3.13,>=3.9; 1.26.1 Requires-Python <3.13,>=3.9; 1.26.2 Requires-Python >=3.9; 1.26.3 Requires-Python >=3.9; 1.26.4 Requires-Python >=3.9; 2.0.0 Requires-Python >=3.9; 2.0.1 Requires-Python >=3.9; 2.0.2 Requires-Python >=3.9; 2.1.0 Requires-Python >=3.10; 2.1.0rc1 Requires-Python >=3.10; 2.1.1 Requires-Python >=3.10; 2.1.2 Requires-Python >=3.10
      ERROR: Could not find a version that satisfies the requirement numpy<2.3,>=2 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4)
      ERROR: No matching distribution found for numpy<2.3,>=2
      [end of output]

To Reproduce
Try executing pip install pandas[performance]~=2.0 with a system running with Python 3.8. If you pin Bottleneck as Bottleneck==1.4.0, then it installs properly.

Expected behavior
Bottleneck should either install, or pip should pick a version of Bottleneck that installs.

@rdbisme
Copy link
Collaborator

rdbisme commented Oct 14, 2024

Hello, I've decided to deprecate Python 3.7 and 3.8: c1f9529

Reason being setuptools has removed a bit of code required to build numpy on musllinux. Considering that 3.7 and 3.8 are End of Life, and the lack of time of finding a workaround, that was the easiest way to make bottleneck available for 3.13.

If someone can contribute a fix, happy to merge it.

This is the error I was getting:

Building wheel...
  
      + rm -rf /tmp/cibuildwheel/built_wheel
      + mkdir -p /tmp/cibuildwheel/built_wheel
      + python -m pip wheel /project --wheel-dir=/tmp/cibuildwheel/built_wheel --no-deps
  Processing /project
    Installing build dependencies: started
    Installing build dependencies: finished with status 'error'
    error: subprocess-exited-with-error
    
    × pip subprocess to install build dependencies did not run successfully.
    │ exit code: 1
    ╰─> [68 lines of output]
        Ignoring numpy: markers 'python_version >= "3.9"' don't match your environment
        Collecting setuptools
          Downloading setuptools-75.1.0-py3-none-any.whl.metadata (6.9 kB)
        Collecting versioneer
          Using cached versioneer-0.29-py3-none-any.whl.metadata (16 kB)
        Collecting wheel
          Downloading wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB)
        Collecting oldest-supported-numpy
          Using cached oldest_supported_numpy-2023.12.21-py3-none-any.whl.metadata (9.8 kB)
        Collecting numpy==1.17.3 (from oldest-supported-numpy)
          Downloading numpy-1.17.3.zip (6.4 MB)
             ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 60.7 MB/s eta 0:00:00
          Preparing metadata (setup.py): started
          Preparing metadata (setup.py): finished with status 'done'
        Downloading setuptools-75.1.0-py3-none-any.whl (1.2 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 78.2 MB/s eta 0:00:00
        Using cached versioneer-0.29-py3-none-any.whl (46 kB)
        Downloading wheel-0.44.0-py3-none-any.whl (67 kB)
        Using cached oldest_supported_numpy-2023.12.21-py3-none-any.whl (4.9 kB)
        Building wheels for collected packages: numpy
          Building wheel for numpy (setup.py): started
          Building wheel for numpy (setup.py): finished with status 'error'
          error: subprocess-exited-with-error
        
          × python setup.py bdist_wheel did not run successfully.
          │ exit code: 1
          ╰─> [15 lines of output]
              Running from numpy source directory.
              Traceback (most recent call last):
                File "<string>", line 2, in <module>
                File "<pip-setuptools-caller>", line 34, in <module>
                File "/tmp/pip-install-jvgaq4jj/numpy_ffb6fc79a08646a4a4b3b01cfd2ba9da/setup.py", line 443, in <module>
                  setup_package()
                File "/tmp/pip-install-jvgaq4jj/numpy_ffb6fc79a08646a4a4b3b01cfd2ba9da/setup.py", line 422, in setup_package
                  from numpy.distutils.core import setup
                File "/tmp/pip-install-jvgaq4jj/numpy_ffb6fc79a08646a4a4b3b01cfd2ba9da/numpy/distutils/core.py", line 26, in <module>
                  from numpy.distutils.command import config, config_compiler, \
                File "/tmp/pip-install-jvgaq4jj/numpy_ffb6fc79a08646a4a4b3b01cfd2ba9da/numpy/distutils/command/config.py", line 20, in <module>
                  from numpy.distutils.mingw32ccompiler import generate_manifest
                File "/tmp/pip-install-jvgaq4jj/numpy_ffb6fc79a08646a4a4b3b01cfd2ba9da/numpy/distutils/mingw32ccompiler.py", line 34, in <module>
                  from distutils.msvccompiler import get_build_version as get_build_msvc_version
              ModuleNotFoundError: No module named 'distutils.msvccompiler'
              [end of output]
        
          note: This error originates from a subprocess, and is likely not a problem with pip.
          ERROR: Failed building wheel for numpy
          Running setup.py clean for numpy
          error: subprocess-exited-with-error
        
          × python setup.py clean did not run successfully.
          │ exit code: 1
          ╰─> [10 lines of output]
              Running from numpy source directory.
        
              `setup.py clean` is not supported, use one of the following instead:
        
                - `git clean -xdf` (cleans all files)
                - `git clean -Xdf` (cleans all versioned files, doesn't touch
                                    files that aren't checked into the git repo)
        
              Add `--force` to your command to use it anyway if you must (unsupported).
        
              [end of output]
        
          note: This error originates from a subprocess, and is likely not a problem with pip.
          ERROR: Failed cleaning build dir for numpy
        Failed to build numpy
        ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numpy)
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
 

and there's a reference link in the issue.

The easiest for you would be to upgrade to Python 3.9+

@rdbisme rdbisme closed this as completed Oct 14, 2024
@GergelyKalmar
Copy link
Author

Sure, that's all fine, but then Bottleneck should have been marked to be requiring Python 3.9+ for versions >1.4.0, no? That way pip will keep installing the working (older) versions on platforms with Python 3.8, instead of trying to build the versions that won't build.

@rdbisme rdbisme reopened this Oct 18, 2024
rdbisme added a commit that referenced this issue Oct 18, 2024
@GergelyKalmar
Copy link
Author

Awesome, thank you very much! :)

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

No branches or pull requests

2 participants