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

Skip to content

Can't find a pure Python 3 wheel for: 'tornado>=5.1' #2291

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

Open
3 tasks done
justinmann opened this issue Feb 14, 2025 · 8 comments
Open
3 tasks done

Can't find a pure Python 3 wheel for: 'tornado>=5.1' #2291

justinmann opened this issue Feb 14, 2025 · 8 comments
Labels
needs-triage Issue needs triage type: bug Something isn't working

Comments

@justinmann
Copy link

Checklist

  • I added a descriptive title
  • I searched for other issues and couldn't find a solution or duplication
  • I already searched in Google and didn't find any good information or help

What happened?

If I update the Bokeh example to use the current version of PyScript, it fails with this error.
https://pyscript.com/@08c3cff3-0e42-4fe0-91bb-626eef1ce818/bokeh-copy-copy/latest?files=README.md,main.py,index.html

What browsers are you seeing the problem on? (if applicable)

Chrome

Console info

pyodide.asm.js:10 Uncaught (in promise) PythonError: Traceback (most recent call last):
  File "/lib/python3.12/site-packages/micropip/package_manager.py", line 133, in install
    return await install(
           ^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/micropip/install.py", line 57, in install
    raise ValueError(
ValueError: Can't find a pure Python 3 wheel for: 'tornado>=5.1'
See: https://pyodide.org/en/stable/usage/faq.html#why-can-t-micropip-find-a-pure-python-wheel-for-a-package


    at new_error (pyodide.asm.js:10:10009)
    at pyodide.asm.wasm:0x16e356
    at pyodide.asm.wasm:0x17849f
    at pyodide.asm.wasm:0x328567
    at pyodide.asm.wasm:0x1c441a
    at pyodide.asm.wasm:0x2ca2cc
    at pyodide.asm.wasm:0x20c217
    at pyodide.asm.wasm:0x1c4b01
    at pyodide.asm.wasm:0x1c4e10
    at pyodide.asm.wasm:0x1c4e8e
    at pyodide.asm.wasm:0x2a0ca0
    at pyodide.asm.wasm:0x2a71fe
    at pyodide.asm.wasm:0x1c4fce
    at pyodide.asm.wasm:0x1c4c37
    at pyodide.asm.wasm:0x177aff
    at callPyObjectKwargs (pyodide.asm.js:10:62781)
    at Module.callPyObjectMaybePromising (pyodide.asm.js:10:63963)
    at wrapper (pyodide.asm.js:10:27341)
    at onGlobalMessage (pyodide.asm.js:10:101379)

Additional Context

No response

@justinmann justinmann added needs-triage Issue needs triage type: bug Something isn't working labels Feb 14, 2025
@WebReflection
Copy link
Contributor

There is no tornado available in Pyodide https://pyodide.org/en/stable/usage/packages-in-pyodide.html

@justinmann
Copy link
Author

That makes sense, but the Bokeh example used to work in the older version of PyScript. If you look at my code, all I did was take the Bokeh example from the PyScript website and update PyScript to the latest the version.

@WebReflection
Copy link
Contributor

is Bokeh using latest 3.6.0 version or it's pinned to an old one? 🤔

@Neon22
Copy link
Contributor

Neon22 commented Feb 25, 2025

You will need to find the version of bokeh that was used in the example.
Maybe the author forgot to pin the bokeh version into the toml file - which is why it doesn't work now - because the bokeh people added tornado recently.

Looking at the release history:

Maybe "bokeh==3.6.0" is worth a try

@Neon22
Copy link
Contributor

Neon22 commented Feb 25, 2025

If I look at one of the bokeh examples:

@fpliger
Copy link
Contributor

fpliger commented Feb 26, 2025

While probably being an upstream dependency issue (from the looks of it, bokeh doesn't need tornado unless you are using the server), I think this issue is actually an opportunity to fix the user experience. Iirc, Bokeh is not the only data viz package that depends on Tornado for features that are not relevant in wasm based python interpreters. Adding a plugin or something like that, that installs and patches dependencies to make things work transparently would benefit the user experience.

I don't think this change should be done at the pyscript codebase level though, or at least we should put some thought into it...

@WebReflection
Copy link
Contributor

Adding a plugin or something like that, that installs and patches dependencies to make things work transparently would benefit the user experience.

all I can think about is a packages_ignore_list in the TOML/JSON config file that requires a bit of extra parsing but it could help removing unnecessary packages ... although, it's not under our responsibility to "poison" the micropip resolution and I think it does that automatically so I fully agree we should try to improve but I don't know how and I am going to find out if pyodide already offers such feature, in which case we can help mitigating the issue, or at least document it!

@WebReflection
Copy link
Contributor

ok ... after a quick search I couldn't find any way to tell micropip that tornado is not really needed but I wonder if adding the ability to mock packages could help solving those one missing or conflicting ... https://micropip.pyodide.org/en/v0.7.1/project/api.html#micropip.add_mock_package

I still think not pinning packages is still "the elephant in the room" and we should stress all over the docs that issues like this one will keep happening every single time a package introduces a dependency that is not available, or changes its API in a breaking way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue needs triage type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants