Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Missing wheels for readthedocs environment #19233

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
bouthilx opened this issue Jan 21, 2021 · 7 comments Β· Fixed by #19235
Closed

Missing wheels for readthedocs environment #19233

bouthilx opened this issue Jan 21, 2021 · 7 comments Β· Fixed by #19235

Comments

@bouthilx
Copy link

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

@glemaitre
Copy link
Member

This seems to be right. We got a similar report on the mailing list where it was not clear why pip did not fetch the wheel.

I assume that we can upload the manylinux1 wheels 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
Copy link
Member

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/

Collecting scikit-learn
  Downloading scikit_learn-0.24.1-cp37-cp37m-manylinux2010_x86_64.whl (22.3 MB)

@glemaitre
Copy link
Member

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.gz file and the wheel for your system was not yet uploaded. It triggered the installation from the source then.

@glemaitre glemaitre removed the Bug label Jan 22, 2021
@bouthilx
Copy link
Author

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
Copy link
Member

glemaitre commented Jan 22, 2021

Something is still weird with the builds that are falling, e.g. https://readthedocs.org/projects/orion/builds/12803515/
pip is greater than 19.3 so it installing scikit-learn using pip should get the wheel even with manylinux2010.

Locally, with pip=20.3.3, the wheel is fetched. I am wondering if easy_install is not used to install the package instead of pip.
NB: we see that psutil is also installed from the tar.gz and they as well store manylinux2010 wheels.

@bouthilx
Copy link
Author

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
Copy link

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 install or pip install .. When not using a configuration file (which was your case in master), RTD defaults to the former, which in turn triggered easy_install, I believe. Feel free to open an issue if you find more annoyances or weird things πŸ‘

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.

3 participants