Summary
Getting “Module not Found error” for 2 different model deployments, one for pytorch and one for tensorflow;
Even though both are installed in the system and the environment.
Error
Code snippet:
ModuleNotFoundError: No module named 'tensorflow'
Traceback:
File "C:\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 564, in _run_script
exec(code, module.__dict__)
File "C:\Users\utkar\omdena_paid\ZOWASELTEAMOMDENA\deployment\pesticide.py", line 2, in <module>
import tensorflow as tf
Same for pytorch
If applicable, please provide the steps we should take to reproduce the error or specified behavior.
Expected behavior:
Expect to not have this error
Debug info
- Streamlit version: 1.15.1
- Python version: 3.10.9
- Using venv
- OS version:
- Browser version: Chrome 108 on Windows 11
Requirements file
absl-py==1.3.0
astunparse==1.6.3
cachetools==5.2.0
certifi==2022.12.7
charset-normalizer==2.1.1
flatbuffers==22.12.6
gast==0.4.0
google-auth==2.15.0
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.51.1
h5py==3.7.0
idna==3.4
keras==2.11.0
libclang==14.0.6
Markdown==3.4.1
MarkupSafe==2.1.1
numpy==1.24.1
oauthlib==3.2.2
opt-einsum==3.3.0
packaging==22.0
protobuf==3.19.6
pyasn1==0.4.8
pyasn1-modules==0.2.8
requests==2.28.1
requests-oauthlib==1.3.1
rsa==4.9
six==1.16.0
tensorboard==2.11.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.11.0
tensorflow-estimator==2.11.0
tensorflow-intel==2.11.0
tensorflow-io-gcs-filesystem==0.29.0
termcolor==2.1.1
torch==1.13.1
typing_extensions==4.4.0
urllib3==1.26.13
Werkzeug==2.2.2
wrapt==1.14.1
Links
- Link to your GitHub repo:
- Link to your deployed app:
Additional information
It’s a private repo, for which I don’t have the admin rights;
The error is from importing tensorflow and pytorch libraries the .py
script but both are already installed.