-
Notifications
You must be signed in to change notification settings - Fork 6
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
ModuleNotFoundError: No module named 'torch' #2
Comments
I'm having the same issues, just different imported modules can't be found. |
Okay, I think I found an issue. If you have some dependencies make sure you running compilation from the same env. In my case, I had venv in one place, but because of requirement to run py2wasm from python 11 I decided to separately call it outside venv. And that resulted that none of the dependencies were found. After I resetup whole venv with python 11 and launched compilation from this venv (with all installed dependencies) compilation now found a lot of files
@su3 So, make sure you running everything from the same env. Because in your log it says only 7 files found for linking, which I think is a mistake (I believe pytorch has more than 7 c level dependencies). |
I confirm that I tested and compiled in the same environment. Running the Python script directly works without any issues. |
Hey @su3 , running torch (and any other native python modules that rare using C) in WASI is not yet supported. We are working on adding them as part of WASIX, and doin that sholud solve this issue |
Hello @syrusakbary do you have any updates on running python native extenisons? |
I wrote a simple Python program for testing. After execution, I got:
The code is as follows:
Here's the compilation process:
It works fine when compiled with Nuitka.
The current environment is:
Not sure what went wrong?
The text was updated successfully, but these errors were encountered: