Skip to content
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

Using pygame in pyscript #592

Closed
3 tasks done
Python-Ninja-Hebi opened this issue Jul 11, 2022 · 4 comments
Closed
3 tasks done

Using pygame in pyscript #592

Python-Ninja-Hebi opened this issue Jul 11, 2022 · 4 comments
Labels
waiting on reporter Further information is requested from the reported

Comments

@Python-Ninja-Hebi
Copy link

Checklist

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

What is the issue/comment/problem?

I would like to use pygame in pyscript.

Do you use pyodide 3.11 so pygame should work?

pygame/pygame#718 (comment)

Best Regards Hebi

@Python-Ninja-Hebi Python-Ninja-Hebi added the needs-triage Issue needs triage label Jul 11, 2022
@marimeireles
Copy link
Member

Are you encountering an error?
Please add it here.

@marimeireles marimeireles added waiting on reporter Further information is requested from the reported and removed needs-triage Issue needs triage labels Jul 18, 2022
@manuel-delverme
Copy link

hijacking since I'm facing the same issue, this is my error

Uncaught (in promise) PythonError: Traceback (most recent call last):
  File "/lib/python3.10/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/lib/python3.10/asyncio/tasks.py", line 234, in __step
    result = coro.throw(exc)
  File "/lib/python3.10/site-packages/micropip/_micropip.py", line 183, in install
    transaction = await self.gather_requirements(requirements, ctx, keep_going)
  File "/lib/python3.10/site-packages/micropip/_micropip.py", line 173, in gather_requirements
    await gather(*requirement_promises)
  File "/lib/python3.10/asyncio/futures.py", line 284, in __await__
    yield self  # This tells Task to wait for completion.
  File "/lib/python3.10/asyncio/tasks.py", line 304, in __wakeup
    future.result()
  File "/lib/python3.10/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/lib/python3.10/asyncio/tasks.py", line 232, in __step
    result = coro.send(None)
  File "/lib/python3.10/site-packages/micropip/_micropip.py", line 286, in add_requirement
    raise ValueError(
ValueError: Couldn't find a pure Python 3 wheel for 'pygame'. You can use `micropip.install(..., keep_going=True)` to get a list of all packages with missing wheels.

    at new_error (pyodide.asm.js:14:238191)
    at pyodide.asm.wasm:0xedbcb
    at pyodide.asm.wasm:0xf1a0e
    at method_call_trampoline (pyodide.asm.js:14:238105)
    at pyodide.asm.wasm:0x134c2c
    at pyodide.asm.wasm:0x217a84
    at pyodide.asm.wasm:0x174a14
    at pyodide.asm.wasm:0x135149
    at pyodide.asm.wasm:0x135243
    at pyodide.asm.wasm:0x1352e6
    at pyodide.asm.wasm:0x1fff83
    at pyodide.asm.wasm:0x1f98b5
    at pyodide.asm.wasm:0x135329
    at pyodide.asm.wasm:0x201f1b
    at pyodide.asm.wasm:0x1ff9ff
    at pyodide.asm.wasm:0x1f98b5
    at pyodide.asm.wasm:0x135329
    at pyodide.asm.wasm:0xf16d8
    at Module.callPyObjectKwargs (pyproxy.gen.ts:360:23)
    at Module.callPyObject (pyproxy.gen.ts:384:17)
    at wrapper (pyodide.asm.js:14:205222)

@pmp-p
Copy link

pmp-p commented Jul 22, 2022

hi, it's a pyodide issue to follow here pyodide/pyodide#289
i won't backport pygame to 3.10 because there are numpy issues, it is way simpler for pygame-web to be patient and load all pyodide 3.11 modules with pip and be used directly as pyscript engine than the other way around.

pygame use and will follow only CPython upstream build system, but i'll make sure to gain compatibility with pyscript.

i'd love to hear about real use cases here pygame-web/pygbag#24

@marimeireles
Copy link
Member

Oh cool, so that means that the 3.11 is working?
This is good news for @ntoll
Thanks for letting us know @pmp-p, we're big fans of pygame here at PyScript 😄
I'm closing this as no-fix for now... Maybe in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting on reporter Further information is requested from the reported
Projects
Archived in project
Development

No branches or pull requests

4 participants