No module named 'torch'

Hi :wave:

Cant deploy my app 'cause i get

ModuleNotFoundError: No module named 'torch' but i have torch>=1.7 in the requirements.txt

Repo: GitHub - angelicaba23/app-super-resolution at dev

Hi :wave: @Kanak !

Sure! im sending the log file.
repo: GitHub - angelicaba23/app-super-resolution at prod

this is the i guess…

I dont know if is there any other way to have the package installed to use it, i’ve tried with:

  • cloning the repo inside mine but only keeping the ‘basicsr’ folder
  • still importing the same way as it was(from basicsr.utils import imwrite)

but i get this…

and inside the code is this but i dont know how to do it (set BASICSR_JIT=True during running) bc i use the env var but dosent work.

Unfortunately, it’s not clear to me how to solve this issue, as it looks like a package calls out to a subprocess to install torch, which is a non-standard Python way of handling installs which we haven’t planned for on Streamlit Cloud.