i got error message No module named ‘tensorflow’, this is my requiremnent.txt file content
beautifulsoup4==4.12.2
keras==2.12.0
matplotlib==3.7.2
numpy==1.24.3
pandas==1.5.3
Requests==2.31.0
scikit_learn==1.2.2
streamlit==1.26.0
tensorflow==2.12.0
openpyxl==3.1.2
cryptocmd==0.6.4
xlsxwriter==3.1.1
This is the log
2024-02-08 17:00:42.035 Uncaught app exception
Traceback (most recent call last):
File “/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 565, in _run_script
exec(code, module.dict)
File “/mount/src/cryptocurrency-predicition-app/project/main.py”, line 9, in
from keras.models import load_model
File “/home/adminuser/venv/lib/python3.11/site-packages/keras/init.py”, line 21, in
from keras import models
File “/home/adminuser/venv/lib/python3.11/site-packages/keras/models/init.py”, line 18, in
from keras.engine.functional import Functional
File “/home/adminuser/venv/lib/python3.11/site-packages/keras/engine/functional.py”, line 24, in
import tensorflow.compat.v2 as tf
ModuleNotFoundError: No module named ‘tensorflow’
2024-02-08 17:00:42.186 503 GET /script-health-check (10.12.48.32) 169.23ms
Could you try out with a small subset of libraries and then incrementally add the others afterwards (also make sure to reboot the app afterwards to ensure that the library gets installed).
Your requirements.txt works for me. Sometimes streamlit cloud doesn’t pick the changes to requirements.txt until you reboot or redeploy the application.
It’s something that I would typically try if the bulk of libraries provided in requirements.txt file does not work. This would help to rule out which one works and which one does not.
As also mentioned earlier, it’s also worth trying to reboot the app after changes is made to the requirements.txt file in order to ensure that it gets installed.
@Goyo confirmed that your requirements.txt works, perhaps you can try rebooting the app.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.