-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Undeclared build dependency on cython #15298
Copy link
Copy link
Labels
Milestone
Description
Description
pip install scikit-learn --no-binary :all: fails to install scikit because of missing cython build dependency. Once cython is installed manually the above command works and installs scikit-learn.
Steps/Code to Reproduce
pip install scikit-learn --no-binary :all:
it's also the case for python implementations that don't have scikit-learn wheels available (PyPy3, Python3.8)
Expected Results
scikit-learn installs successfully
Actual Results
Running setup.py install for scikit-learn ... error
Complete output from command /home/user/pypy3-venv/bin/pypy3-c -u -c "import setuptools, tokenize;__file__='/var/tmp/pip-install-zf4xear5/scikit-learn/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/tmp/pip-record-k9u2qwff/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/pypy3-venv/include/site/python3.6/scikit-learn:
Partial import of sklearn during the build process.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/var/tmp/pip-install-zf4xear5/scikit-learn/setup.py", line 290, in <module>
setup_package()
File "/var/tmp/pip-install-zf4xear5/scikit-learn/setup.py", line 286, in setup_package
setup(**metadata)
File "/home/user/pypy3-venv/site-packages/numpy/distutils/core.py", line 137, in setup
config = configuration()
File "/var/tmp/pip-install-zf4xear5/scikit-learn/setup.py", line 174, in configuration
config.add_subpackage('sklearn')
File "/home/user/pypy3-venv/site-packages/numpy/distutils/misc_util.py", line 1035, in add_subpackage
caller_level = 2)
File "/home/user/pypy3-venv/site-packages/numpy/distutils/misc_util.py", line 1004, in get_subpackage
caller_level = caller_level + 1)
File "/home/user/pypy3-venv/site-packages/numpy/distutils/misc_util.py", line 941, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "sklearn/setup.py", line 62, in configuration
config.add_subpackage('utils')
File "/home/user/pypy3-venv/site-packages/numpy/distutils/misc_util.py", line 1035, in add_subpackage
caller_level = 2)
File "/home/user/pypy3-venv/site-packages/numpy/distutils/misc_util.py", line 1004, in get_subpackage
caller_level = caller_level + 1)
File "/home/user/pypy3-venv/site-packages/numpy/distutils/misc_util.py", line 941, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "sklearn/utils/setup.py", line 8, in configuration
from Cython import Tempita
ModuleNotFoundError: No module named 'Cython'
----------------------------------------
Command "/home/user/pypy3-venv/bin/pypy3-c -u -c "import setuptools, tokenize;__file__='/var/tmp/pip-install-zf4xear5/scikit-learn/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/tmp/pip-record-k9u2qwff/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/pypy3-venv/include/site/python3.6/scikit-learn" failed with error code 1 in /var/tmp/pip-install-zf4xear5/scikit-learn/
Versions
Reactions are currently unavailable