Skip to content

Broken install dependencies (numpy) on PyPy #17214

Closed

Description

@jvesely

Describe the bug

scikit-learn installation on pypy fails because of conflicting numpy dependencies
project.toml:

"numpy==1.13.3; python_version=='3.6' and platform_system!='AIX'",

vs.
setup.py:

if platform.python_implementation() == 'PyPy':
    SCIPY_MIN_VERSION = '1.1.0'
    NUMPY_MIN_VERSION = '1.14.0'
else:
    SCIPY_MIN_VERSION = '0.19.1'
    NUMPY_MIN_VERSION = '1.13.3'

this leads to inevitable:

  ImportError: Your installation of numpy 1.13.3 is out-of-date.
  scikit-learn requires numpy >= 1.14.0.
  Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
  
  ----------------------------------------
  ERROR: Failed building wheel for scikit-learn
Failed to build scikit-learn

Steps/Code to Reproduce

pypy3 -m pip install scikit-learn

Expected Results

package installed successfully

Actual Results

  ImportError: Your installation of numpy 1.13.3 is out-of-date.
  scikit-learn requires numpy >= 1.14.0.
  Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
  
  ----------------------------------------
  ERROR: Failed building wheel for scikit-learn
Failed to build scikit-learn

Versions

scikit-learn-0.23.0

Activity

  1. jvesely commented on May 14, 2020

    @jvesely
    ContributorAuthor

    This line in pyproject.toml:

    "numpy==1.13.3; python_version=='3.6' and platform_system!='AIX'",
    

    needs to be replaced with

    "numpy==1.13.3; python_version=='3.6' and platform_system!='AIX' and platform_python_implementation=='CPython'",
    "numpy==1.14.0; python_version=='3.6' and platform_system!='AIX' and platform_python_implementation!='CPython'",
    
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