Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

How to add packages to this python environment? #2

Open
Mossaka opened this issue Mar 22, 2022 · 3 comments
Open

How to add packages to this python environment? #2

Mossaka opened this issue Mar 22, 2022 · 3 comments

Comments

@Mossaka
Copy link

Mossaka commented Mar 22, 2022

I've tried copy the package from site-packages to opt/wasi-python/lib/python3.11, but python interpreter cannot find the module. Is it because the path only include built-in libraries, no 3rd party packages?

@radu-matei
Copy link
Member

Yeah, we currently don't have any packages compiled.
We're exploring ways to add 3rd party packages — the Pyodide folks did a fantastic job for browser-based Wasm, but I'm not sure how to do something similar for WASI.

Do you have any ideas how we could do this?

@lann
Copy link

lann commented Mar 22, 2022

This might be worth a try: https://docs.python.org/3/library/zipapp.html#creating-standalone-applications-with-zipapp

@Mossaka
Copy link
Author

Mossaka commented Mar 22, 2022

Do you have any ideas how we could do this?

I'd like to explore this a bit more and figure out if there is an easy way to compile python to wasm with 3rd party libraries. Did you follow this guide to built the python3.11 enviornment? My conda does not have python 3.11 yet, so I will try building a enviornment using python 3.10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants