You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for opening the issue! You were really close as the only pending step is to configure Python to find the libraries. One approach is adding the PYTHONPATH environment variable. In your case, you only need to modify the index.toml file to set this environment variable:
name = "libs"version = "1"
[vars]
PYTHONPATH = "/mnt/lib"
[[folders]]
from = "./_lib"to = "/mnt/lib"
As you mentioned, there's no documentation about it so I took the opportunity to add a new example and fill this gap in the docs (#190):
Describe the bug
Hi,
I wanted to run a Python module with dependencies.
When running the following code, I get an
ModuleNotFoundError: No module named 'bs4'
I guess I need to mount my dependencies or install them in wws (?)
But I could not find any documentation about it.
Reproduction steps
index.py
wws -i
Expected behavior
No error when importing modules.
Additional context
Things I tried:
I checked the documentation, but could not find anything about adding dependencies in python based modules (only Rust).
However I tried to create a
_lib
directory with thebs4
dependency and mount it.index.toml
I adjusted the import to
import lib.bs4
, but this didn't worked. It says that thelib
module is not found.Thanks,
Dennis
The text was updated successfully, but these errors were encountered: