8000 Installing scikit-learn from the main branch fails with `scikit-learn requires numpy >= 1.14.6` · Issue #20189 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Installing scikit-learn from the main branch fails with scikit-learn requires numpy >= 1.14.6 #20189

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

Closed
harupy opened this issue Jun 2, 2021 · 7 comments · Fixed by #20184
Closed

Comments

@harupy
Copy link
Contributor
harupy commented Jun 2, 2021

Describe the bug

pip install git+https://github.com/scikit-learn/scikit-learn.git

fails with the following error:

$ pip install git+https://github.com/scikit-learn/scikit-learn.git
Collecting git+https://github.com/scikit-learn/scikit-learn.git
  Cloning https://github.com/scikit-learn/scikit-learn.git to /tmp/pip-req-build-xbo_4nwf
  Running command git clone -q https://github.com/scikit-learn/scikit-learn.git /tmp/pip-req-build-xbo_4nwf
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/share/miniconda/bin/python /usr/share/miniconda/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpmzvhqjhs
         cwd: /tmp/pip-req-build-xbo_4nwf
    Complete output (24 lines):
    Partial import of sklearn during the build process.
    Traceback (most recent call last):
      File "/usr/share/miniconda/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 280, in <module>
        main()
      File "/usr/share/miniconda/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 263, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/usr/share/miniconda/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 133, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/tmp/pip-build-env-jjptwtgc/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/tmp/pip-build-env-jjptwtgc/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 259, in run_setup
        self).run_setup(setup_script=setup_script)
      File "/tmp/pip-build-env-jjptwtgc/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 150, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 300, in <module>
        setup_package()
      File "setup.py", line 286, in setup_package
        check_package_status('numpy', min_deps.NUMPY_MIN_VERSION)
      File "setup.py", line 223, in check_package_status
        req_str, instructions))
    ImportError: Your installation of numpy 1.14.5 is out-of-date.
    scikit-learn requires numpy >= 1.14.6.
    Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html

Steps/Code to Reproduce

pip install git+https://github.com/scikit-learn/scikit-learn.git

Expected Results

pip install git+https://github.com/scikit-learn/scikit-learn.git

should successfully install the dev version of scikit-learn

Actual Results

Versions

I'm using Python 3.7.

@harupy harupy changed the title Installing scikit-learn from the main branch fails with Installing scikit-learn from the main branch fails with scikit-learn requires numpy >= 1.14.6 Jun 2, 2021
@harupy
Copy link
Contributor Author
harupy commented Jun 2, 2021

Seems related to #20149

@harupy
Copy link
Contributor Author
harupy commented Jun 2, 2021

Fixing this line:

"oldest-supported-numpy",

to:

numpy==1.14.6  # or numpy>=1.14.6?

might fix the issue

@alfaro96
Copy link
Member
alfaro96 commented Jun 2, 2021

Related with: #20184 (comment).

@thomasjpfan
Copy link
Member

Merging #20184 should resolve this issue. (Although it means we are deviating a little from oldest-supported-numpy)

@ogrisel
Copy link
Member
ogrisel commented Jun 3, 2021

I merged #20184, let's see if it works as expected.

@ogrisel
Copy link
Member
ogrisel commented Jun 3, 2021

It works (I tried in an empty python docker container).

@harupy
Copy link
Contributor Author
harupy commented Jun 3, 2021

Confirmed the fix works! Thanks for the quick action on this :)

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

Successfully merging a pull request may close this issue.

4 participants
0