Repository navigation
Description
Describe the bug
Since the release of 0.24 readthedocs crashes during the installation of scikit-learn. Prior to 0.24, it would simply install scikit-learn using the available wheel scikit_learn-0.23.2-cp37-cp37m-manylinux1_x86_64.whl. There are no wheels for manylinux1 since 0.24, only manylinux2010. I guess that is why readthedocs fails to find a compatible wheel and try installing from source instead.
Complete logs for last successful build of readthedocs: https://readthedocs.org/projects/orion/builds/12473944/
Installed /home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/site-packages/orion-0.1.10.post1+g9f8a4aa-py3.7.egg
Processing dependencies for orion==0.1.10.post1+g9f8a4aa
Searching for scikit-learn
Reading https://pypi.org/simple/scikit-learn/
Downloading https://files.pythonhosted.org/packages/f4/cb/64623369f348e9bfb29ff898a57ac7c91ed4921f228e9726546614d63ccb/scikit_learn-0.23.2-cp37-cp37m-manylinux1_x86_64.whl#sha256=da8e7c302003dd765d92a5616678e591f347460ac7b53e53d667be7dfe6d1b10
Best match: scikit-learn 0.23.2
Processing scikit_learn-0.23.2-cp37-cp37m-manylinux1_x86_64.whl
Installing scikit_learn-0.23.2-cp37-cp37m-manylinux1_x86_64.whl to /home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/site-packages
writing requirements to /home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/site-packages/scikit_learn-0.23.2-py3.7-linux-x86_64.egg/EGG-INFO/requires.txt
Adding scikit-learn 0.23.2 to easy-install.pth file
Complete logs of first failing build of readthedocs: https://readthedocs.org/projects/orion/builds/12473944/
Installed /home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/site-packages/orion-0.1.10.post3+gea90a9e-py3.7.egg
Processing dependencies for orion==0.1.10.post3+gea90a9e
Searching for scikit-learn
Reading https://pypi.org/simple/scikit-learn/
Downloading https://files.pythonhosted.org/packages/f9/98/7a46eb605191918b777796ce5792be83ce9d2a739340be7d21d423fcfaf4/scikit-learn-0.24.0rc1.tar.gz#sha256=d4737b5bd2180c71453b5b1baa47f5ee2ed941d1bdda8eee6a9274d6f9e4b503
Best match: scikit-learn 0.24.0rc1
Processing scikit-learn-0.24.0rc1.tar.gz
Writing /tmp/easy_install-jtb4m3p0/scikit-learn-0.24.0rc1/setup.cfg
Running scikit-learn-0.24.0rc1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jtb4m3p0/scikit-learn-0.24.0rc1/egg-dist-tmp-56qidrrm
Partial import of sklearn during the build process.
Traceback (most recent call last):
File "/tmp/easy_install-jtb4m3p0/scikit-learn-0.24.0rc1/setup.py", line 201, in check_package_status
module = importlib.import_module(package)
File "/home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'numpy'
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/home/docs/checkouts/readthedocs.org/user_builds/orion/envs/latest/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-jtb4m3p0/scikit-learn-0.24.0rc1/setup.py", line 305, in <module>
File "/tmp/easy_install-jtb4m3p0/scikit-learn-0.24.0rc1/setup.py", line 291, in setup_package
File "/tmp/easy_install-jtb4m3p0/scikit-learn-0.24.0rc1/setup.py", line 227, in check_package_status
ImportError: numpy is not installed.
scikit-learn requires numpy >= 1.13.3.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
Any idea why the supported platform wheels changed since 0.24?
Also it looks like I am not the only one affected: https://stackoverflow.com/questions/65776380/readthedocs-trouble-with-sklearn-umap
Activity
glemaitre commentedon Jan 22, 2021
This seems to be right. We got a similar report on the mailing list where it was not clear why
pipdid not fetch the wheel.I assume that we can upload the
manylinux1wheels to resolve the issue. We might even think to add the wheels for 0.24.0 if it would avoid some issues.One thing that I don't understand is why the
manylinux2010. It is on my system that is a standard Ubuntu system with pip 20.3 (pip >= 19.0 is required indeed)glemaitre commentedon Jan 22, 2021
Just to clarify, it seems that the fetching of scikit-learn 0.24.1 is working in your latest build: https://readthedocs.org/projects/orion/builds/12821283/
glemaitre commentedon Jan 22, 2021
Looking at the date of your build and the date of the upload, it was the same day. If it was bad luck, we could have uploaded the
tar.gzfile and the wheel for your system was not yet uploaded. It triggered the installation from the source then.bouthilx commentedon Jan 22, 2021
Thanks for the quick response! The build has been consistently failing for more than a month so it was not bad luck. I fixed the issue on my side yesterday by changing the configuration of readthedocs so that it installs with pip: Epistimio/orion#542. That is why it is passing now.
In any case I'm sure adding the manylinux1 wheels will solve the issue for many others, so I would leave this issue open until #19235 is merged.
Thanks again!
glemaitre commentedon Jan 22, 2021
Something is still weird with the builds that are falling, e.g. https://readthedocs.org/projects/orion/builds/12803515/
pipis greater than 19.3 so it installing scikit-learn usingpipshould get the wheel even withmanylinux2010.Locally, with
pip=20.3.3, the wheel is fetched. I am wondering ifeasy_installis not used to install the package instead ofpip.NB: we see that
psutilis also installed from thetar.gzand they as well storemanylinux2010wheels.bouthilx commentedon Jan 22, 2021
Last build of master still fails (without the fix): https://readthedocs.org/projects/orion/builds/12828940/. But develop (with the fix) is passing: https://readthedocs.org/projects/orion/builds/12821283/
In the documentation of readthedocs they explain how to configure it to install with pip but they don't tell what is used otherwise. Maybe it is easy_install indeed.
astrojuanlu commentedon Apr 12, 2021
Hi @bouthilx and subscribed readers! Just stumbled upon this comment while I was looking for something else.
As mentioned in the docs, it's either
python setup.py installorpip install .. When not using a configuration file (which was your case inmaster), RTD defaults to the former, which in turn triggeredeasy_install, I believe. Feel free to open an issue if you find more annoyances or weird things 👍