Hello everyone,
I am new to streamlit + stlite + electron workflow and was encountering this error while running npm run dump streamlit_app
. Any help is greatly appreciated!
PythonError: Traceback (most recent call last):
File "/lib/python311.zip/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1209, in _gcd_import
File "<frozen importlib._bootstrap>", line 1181, in _find_and_load
File "<frozen importlib._bootstrap>", line 1145, in _find_and_load_unlocked
ModuleNotFoundError: The module 'micropip' is included in the Pyodide distribution, but it is not installed.
You can install it by calling:
await micropip.install("micropip") in Python, or
await pyodide.loadPackage("micropip") in JavaScript
See https://pyodide.org/en/stable/usage/loading-packages.html for more details.
at new_error (C:\Users\user\streamlit-desktop\node_modules\pyodide\pyodide.asm.js:9:12519)
at wasm://wasm/02250ad6:wasm-function[295]:0x158827
at wasm://wasm/02250ad6:wasm-function[296]:0x15892c
at Module._pythonexc2js (C:\Users\user\streamlit-desktop\node_modules\pyodide\pyodide.asm.js:9:640895)
at Module.callPyObjectKwargs (C:\Users\user\streamlit-desktop\node_modules\pyodide\pyodide.asm.js:9:81856)
at Module.callPyObject (C:\Users\user\streamlit-desktop\node_modules\pyodide\pyodide.asm.js:9:82066)
at Qe.apply (C:\Users\user\streamlit-desktop\node_modules\pyodide\pyodide.asm.js:9:97147)
at Object.apply (C:\Users\user\streamlit-desktop\node_modules\pyodide\pyodide.asm.js:9:95381)
at Object.pyimport (C:\Users\user\streamlit-desktop\node_modules\pyodide\pyodide.asm.js:9:119720)
at z (C:\Users\user\streamlit-desktop\node_modules\@stlite\desktop\bin\dump_artifacts.js:3:3130)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async C:\Users\user\streamlit-desktop\node_modules\@stlite\desktop\bin\dump_artifacts.js:17:2196 {
type: 'ModuleNotFoundError',
__error_address: 9780880
}
Node.js v18.12.1