-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support installing python wheel from local file system #144
Comments
After mounting a local file system into Pyodide, you can use import micropip
# assuming that the wheel exists in /mnt/pkg/your_package-1.0.0.whl
await micropip.install("emfs:/mnt/pkg/your_package-1.0.0.whl") |
Thanks @ryanking13 , it works after adding the prefix. Instead of installing wheel, can I install the local package directly like using pip, e.g. |
If you make a pyodide virtual environment, you can use pip to install packages and then mount the site-packages folder of the virtual environment as a NodeFS folder and then add it to the path: pip install pyodide-build
pyodide venv .venv-pyodide
.venv-pyodide/bin/pip install -e path/to/mypkg to set up the virtual environment. Then load Pyodide, mount |
If you do:
and then run that file with |
If what you want to do is run pytest, you could do something like:
and it should work quite nicely (unless you need pytest-asyncio which isn't quite set up correctly yet). |
From this doc, I just found the way to import custom python package from url: https://pyodide.org/en/stable/usage/loading-packages.html#installing-wheels-from-arbitrary-urls
While in my use case, I have a python package for internal use only, we don't want to store it in some remote place. So, I'm wondering is it possible to install the python wheel from local file system?
The text was updated successfully, but these errors were encountered: