Skip to content
Discussion options

You must be logged in to vote

You have to run await pyodide.loadPackage('micropip'); before importing micropip. Loading micropip is around ~500kb of data transfer and many applications won't need it. Thanks for pointing out the FAQ error. With runPythonAsync I get the following stack trace:

PythonError: Traceback (most recent call last):
  File "/lib/python3.9/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/lib/python3.9/asyncio/tasks.py", line 256, in __step
    result = coro.send(None)
  File "/lib/python3.9/site-packages/_pyodide/_base.py", line 494, in eval_code_async
    await CodeRunner(
  File "/lib/python3.9/site-packages/_pyodide/_base.py", line 345, in run_async
    coroutine = eval(

Replies: 2 comments 16 replies

Comment options

You must be logged in to vote
9 replies
@henryiii
Comment options

@hoodmane
Comment options

@hoodmane
Comment options

@henryiii
Comment options

@hoodmane
Comment options

Answer selected by henryiii
Comment options

You must be logged in to vote
7 replies
@henryiii
Comment options

@hoodmane
Comment options

@henryiii
Comment options

@hoodmane
Comment options

@henryiii
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants