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
Can one load custom wheel files? (pyodide-built; out of tree) #5
Comments
Yes, you can do it by adding a
Note that, by default it will install the packages from PyPI, but you can also specify a URL. See the live example here: |
Thank you, thats fantastic. And what would you recommend if the wheels are local. For example, in the standalone # example requirements.txt
./packages/pack1.whl
./packages/dep1.whl
./packages/dep2.whl I also notice this route won't work with pyodide packages that are not in the core shinylive distribution. For example, the biopython requirement is not followed and will throw an error. #| standalone: true
## file: app.py
from Bio.Seq import Seq
print(Seq("AACTG"))
## file: requirements.txt
biopython This will yield the following: Traceback (most recent call last):
File "<exec>", line 202, in _start_app
File "/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/pyodide/app_zmur716jvalmlsxccz4r/app.py", line 2, in <module>
from Bio import SeqIO
ModuleNotFoundError: No module named 'Bio' |
Hi Team Py-Shiny,
This is really amazing work; thank you. I am wondering if there current the capability to sideload pyodide-built
.whl
into the environment. I see something similar is done with the requirements.txt file in thepy-shiny
repo and would hope to be able to do the something similar here.Thanks,
zach cp
The text was updated successfully, but these errors were encountered: