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]: Old sklearn dependency #3268

Closed
1 task done
kewrsad opened this issue Jan 24, 2025 · 5 comments
Closed
1 task done

[Bug]: Old sklearn dependency #3268

kewrsad opened this issue Jan 24, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@kewrsad
Copy link

kewrsad commented Jan 24, 2025

What happened?

When trying to install ax-platform with pip in a new conda environment it stops with following error. The error happens when using python 3.13 and not with 3.12.

Collecting sklearn (from ax-platform)
Using cached sklearn-0.0.post12.tar.gz (2.6 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Please provide a minimal, reproducible example of the unexpected behavior.

conda create -n name
conda activate -n name
conda install pip
pip install ax-platform

Please paste any relevant traceback/logs produced by the example provided.

Ax Version

latest

Python Version

3.12/3.13

Operating System

win 11

Code of Conduct

  • I agree to follow Ax's Code of Conduct
@kewrsad kewrsad added the bug Something isn't working label Jan 24, 2025
@Balandat
Copy link
Contributor

Thanks. Looks like scikit-learn just stopped publishing the sklearn package for 3.13. Let me update the references.

@Balandat
Copy link
Contributor

Hmm actually we already have this updated. Not sure why this fails.

Collecting sklearn (from ax-platform)
Using cached sklearn-0.0.post12.tar.gz (2.6 kB)

This seems fishy. Can you clean your conda / pip caches to make sure that this actually resolves and downloads the proper package?

@kewrsad
Copy link
Author

kewrsad commented Jan 24, 2025

The issue is still there after cleaning conda and pip caches.
The conda env has only pip installed

Name Version Build Channel
bzip2 1.0.8 h2466b09_7 conda-forge
ca-certificates 2024.12.14 h56e8100_0 conda-forge
libexpat 2.6.4 he0c23c2_0 conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
liblzma 5.6.3 h2466b09_1 conda-forge
libmpdec 4.0.0 h2466b09_0 conda-forge
libsqlite 3.48.0 h67fdade_1 conda-forge
libzlib 1.3.1 h2466b09_2 conda-forge
openssl 3.4.0 ha4e3fda_1 conda-forge
pip 24.3.1 pyh145f28c_2 conda-forge
python 3.13.1 h071d269_105_cp313 conda-forge
python_abi 3.13 5_cp313 conda-forge
tk 8.6.13 h5226925_1 conda-forge
tzdata 2025a h78e105d_0 conda-forge
ucrt 10.0.22621.0 h57928b3_1 conda-forge
vc 14.3 h5fd82a7_24 conda-forge
vc14_runtime 14.42.34433 h6356254_24 conda-forge
vs2015_runtime 14.42.34433 hfef2bbc_24 conda-forge

Collecting ax-platform
Downloading ax_platform-0.4.3-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.12.0 (from ax-platform)
Downloading botorch-0.12.0-py3-none-any.whl.metadata (11 kB)
Collecting jinja2 (from ax-platform)
Downloading jinja2-3.1.5-py3-none-any.whl.metadata (2.6 kB)
Collecting pandas (from ax-platform)
Downloading pandas-2.2.3-cp313-cp313-win_amd64.whl.metadata (19 kB)
Collecting scipy (from ax-platform)
Downloading scipy-1.15.1-cp313-cp313-win_amd64.whl.metadata (60 kB)
Collecting scikit-learn (from ax-platform)
Downloading scikit_learn-1.6.1-cp313-cp313-win_amd64.whl.metadata (15 kB)
Collecting ipywidgets (from ax-platform)
Downloading ipywidgets-8.1.5-py3-none-any.whl.metadata (2.3 kB)
Collecting plotly>=5.12.0 (from ax-platform)
Downloading plotly-5.24.1-py3-none-any.whl.metadata (7.3 kB)
Collecting pyre-extensions (from ax-platform)
Downloading pyre_extensions-0.0.32-py3-none-any.whl.metadata (4.0 kB)
Collecting multipledispatch (from botorch==0.12.0->ax-platform)
Downloading multipledispatch-1.0.0-py3-none-any.whl.metadata (3.8 kB)
Collecting mpmath<=1.3,>=0.19 (from botorch==0.12.0->ax-platform)
Downloading mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)
INFO: pip is looking at multiple versions of botorch to determine which version is compatible with other requirements. This could take a while.
Collecting ax-platform
Downloading ax_platform-0.4.1-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.11.3 (from ax-platform)
Downloading botorch-0.11.3-py3-none-any.whl.metadata (11 kB)
Collecting typeguard (from ax-platform)
Downloading typeguard-4.4.1-py3-none-any.whl.metadata (3.7 kB)
Collecting ax-platform
Downloading ax_platform-0.4.0-py3-none-any.whl.metadata (12 kB)
Collecting botorch==0.11.0 (from ax-platform)
Downloading botorch-0.11.0-py3-none-any.whl.metadata (11 kB)
Collecting ax-platform
Downloading ax_platform-0.3.7-py3-none-any.whl.metadata (12 kB)
Collecting botorch==0.10.0 (from ax-platform)
Downloading botorch-0.10.0-py3-none-any.whl.metadata (11 kB)
Collecting ax-platform
Downloading ax_platform-0.3.6-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.9.5 (from ax-platform)
Downloading botorch-0.9.5-py3-none-any.whl.metadata (11 kB)
Collecting ax-platform
Downloading ax_platform-0.3.5-py3-none-any.whl.metadata (12 kB)
Collecting botorch==0.9.4 (from ax-platform)
Downloading botorch-0.9.4-py3-none-any.whl.metadata (11 kB)
Collecting typeguard==2.13.3 (from ax-platform)
Downloading typeguard-2.13.3-py3-none-any.whl.metadata (3.6 kB)
Collecting ax-platform
Downloading ax_platform-0.3.4-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.9.2 (from ax-platform)
Downloading botorch-0.9.2-py3-none-any.whl.metadata (11 kB)
Collecting ax-platform
Downloading ax_platform-0.3.3-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.8.5 (from ax-platform)
Downloading botorch-0.8.5-py3-none-any.whl.metadata (10 kB)
INFO: pip is still looking at multiple versions of botorch to determine which version is compatible with other requirements. This could take a while.
Collecting ax-platform
Downloading ax_platform-0.3.2-py3-none-any.whl.metadata (11 kB)
Downloading ax_platform-0.3.1-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.8.3 (from ax-platform)
Downloading botorch-0.8.3-py3-none-any.whl.metadata (10 kB)
Collecting ax-platform
Downloading ax_platform-0.3.0-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.8.2 (from ax-platform)
Downloading botorch-0.8.2-py3-none-any.whl.metadata (10 kB)
Collecting ax-platform
Downloading ax_platform-0.2.10-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.8.0 (from ax-platform)
Downloading botorch-0.8.0-py3-none-any.whl.metadata (9.3 kB)
Collecting ipywidgets<8.0.0 (from ax-platform)
Downloading ipywidgets-7.8.5-py2.py3-none-any.whl.metadata (1.9 kB)
Collecting ax-platform
Downloading ax_platform-0.2.9-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.7.2 (from ax-platform)
Downloading botorch-0.7.2-py3-none-any.whl.metadata (9.2 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
Collecting ax-platform
Downloading ax_platform-0.2.8-py3-none-any.whl.metadata (11 kB)
Downloading ax_platform-0.2.7.2-py3-none-any.whl.metadata (11 kB)
Collecting botorch==0.7.1 (from ax-platform)
Downloading botorch-0.7.1-py3-none-any.whl.metadata (9.2 kB)
Collecting ax-platform
Downloading ax_platform-0.2.6-py3-none-any.whl.metadata (9.1 kB)
Collecting botorch==0.6.6 (from ax-platform)
Downloading botorch-0.6.6-py3-none-any.whl.metadata (9.0 kB)
Collecting ax-platform
Downloading ax_platform-0.2.5.1-py3-none-any.whl.metadata (9.1 kB)
Collecting botorch==0.6.4 (from ax-platform)
Downloading botorch-0.6.4-py3-none-any.whl.metadata (9.0 kB)
Collecting ax-platform
Downloading ax_platform-0.2.4-py3-none-any.whl.metadata (9.0 kB)
Collecting botorch==0.6.2 (from ax-platform)
Downloading botorch-0.6.2-py3-none-any.whl.metadata (8.9 kB)
Collecting ax-platform
Downloading ax_platform-0.2.3-py3-none-any.whl.metadata (8.9 kB)
Collecting botorch==0.6.0 (from ax-platform)
Downloading botorch-0.6.0-py3-none-any.whl.metadata (8.6 kB)
Collecting ax-platform
Downloading ax_platform-0.2.2-py3-none-any.whl.metadata (8.5 kB)
Collecting botorch==0.5.1 (from ax-platform)
Downloading botorch-0.5.1-py3-none-any.whl.metadata (8.6 kB)
Collecting ax-platform
Downloading ax_platform-0.2.1-py3-none-any.whl.metadata (8.5 kB)
Collecting botorch==0.5.0 (from ax-platform)
Downloading botorch-0.5.0-py3-none-any.whl.metadata (8.6 kB)
Collecting ax-platform
Downloading ax_platform-0.2.0-py3-none-any.whl.metadata (8.5 kB)
Downloading ax_platform-0.1.20-py3-none-any.whl.metadata (8.4 kB)
Collecting botorch==0.4.0 (from ax-platform)
Downloading botorch-0.4.0-py3-none-any.whl.metadata (8.6 kB)
Collecting ax-platform
Downloading ax_platform-0.1.19-py3-none-any.whl.metadata (8.1 kB)
Collecting botorch>=0.3.3 (from ax-platform)
Downloading botorch-0.11.1-py3-none-any.whl.metadata (11 kB)
Downloading botorch-0.9.3-py3-none-any.whl.metadata (11 kB)
Downloading botorch-0.9.1-py3-none-any.whl.metadata (11 kB)
Downloading botorch-0.8.4-py3-none-any.whl.metadata (10 kB)
Downloading botorch-0.8.1-py3-none-any.whl.metadata (10 kB)
Downloading botorch-0.7.3-py3-none-any.whl.metadata (9.3 kB)
Downloading botorch-0.7.0-py3-none-any.whl.metadata (9.0 kB)
Downloading botorch-0.6.5-py3-none-any.whl.metadata (9.0 kB)
Downloading botorch-0.6.3.1-py3-none-any.whl.metadata (9.0 kB)
Downloading botorch-0.6.3-py3-none-any.whl.metadata (9.0 kB)
Downloading botorch-0.6.1-py3-none-any.whl.metadata (8.8 kB)
Downloading botorch-0.3.3-py3-none-any.whl.metadata (8.0 kB)
Collecting ax-platform
Downloading ax_platform-0.1.18-py3-none-any.whl.metadata (8.1 kB)
Collecting botorch>=0.3.2 (from ax-platform)
Downloading botorch-0.3.2-py3-none-any.whl.metadata (8.6 kB)
Collecting ax-platform
Downloading ax_platform-0.1.17-py3-none-any.whl.metadata (8.1 kB)
Collecting botorch>=0.3.1 (from ax-platform)
Downloading botorch-0.3.1-py3-none-any.whl.metadata (8.4 kB)
Collecting ax-platform
Downloading ax_platform-0.1.15-py3-none-any.whl.metadata (8.0 kB)
Collecting botorch>=0.2.2 (from ax-platform)
Downloading botorch-0.3.0-py3-none-any.whl.metadata (8.4 kB)
Downloading botorch-0.2.5-py3-none-any.whl.metadata (7.7 kB)
Downloading botorch-0.2.4.tar.gz (184 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Downloading botorch-0.2.3.tar.gz (176 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Downloading botorch-0.2.2-py3-none-any.whl.metadata (7.7 kB)
Collecting ax-platform
Downloading ax_platform-0.1.14-py3-none-any.whl.metadata (8.0 kB)
Downloading ax_platform-0.1.13-py3-none-any.whl.metadata (8.0 kB)
Downloading ax_platform-0.1.12-py3-none-any.whl.metadata (8.0 kB)
Downloading ax_platform-0.1.11-py3-none-any.whl.metadata (8.0 kB)
Downloading ax_platform-0.1.10-py3-none-any.whl.metadata (8.0 kB)
Downloading ax_platform-0.1.9-py3-none-any.whl.metadata (8.0 kB)
Collecting botorch==0.2.1 (from ax-platform)
Downloading botorch-0.2.1-py3-none-any.whl.metadata (7.7 kB)
Collecting ax-platform
Downloading ax_platform-0.1.8-py3-none-any.whl.metadata (7.8 kB)
Collecting botorch==0.2.0 (from ax-platform)
Downloading botorch-0.2.0-py3-none-any.whl.metadata (7.7 kB)
Collecting ax-platform
Downloading ax_platform-0.1.7-py3-none-any.whl.metadata (7.8 kB)
Collecting botorch>=0.1.3 (from ax-platform)
Downloading botorch-0.1.4-py3-none-any.whl.metadata (7.1 kB)
Downloading botorch-0.1.3-py3-none-any.whl.metadata (6.9 kB)
Collecting ax-platform
Downloading ax_platform-0.1.6-py3-none-any.whl.metadata (7.5 kB)
Collecting sklearn (from ax-platform)
Downloading sklearn-0.0.post12.tar.gz (2.6 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

@Balandat
Copy link
Contributor

So I think this is the issue:

INFO: pip is looking at multiple versions of botorch to determine which version is compatible with other requirements. This could take a while.

As a result, this downloads metadata (and source dist) of some really ancient versions (including botorch-0.1.3, which was released 5.5 years ago...), which I assume at some point ends up throwing the error. I have no idea why this is happening in a clean python environment though.

Can you try pip install ax-platform --use-deprecated legacy-resolver instead to see if this fixes this?

@kewrsad
Copy link
Author

kewrsad commented Feb 3, 2025

Sorry for the late response, the legacy-resolver fixes the issue.

@kewrsad kewrsad closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants