简体   繁体   English

ModuleNotFoundError:加载到我的 Heroku 应用程序时没有名为“streamlit”的模块

[英]ModuleNotFoundError: No module named 'streamlit' when loading into my Heroku app

I'm using Python 3.8.5我正在使用 Python 3.8.5

I've made an app in Python that uses Streamlit, and when I deploy it using Heroku, I get this error when loading into the page.我在 Python 中制作了一个使用 Streamlit 的应用程序,当我使用 Heroku 部署它时,加载到页面时出现此错误。

My requirements.txt file contains all the packages and their versions including Streamlit.我的requirements.txt文件包含所有包及其版本,包括 Streamlit。

matplotlib==3.3.3
pandas==1.1.5
numpy==1.19.5
streamlit==0.74.1
tensorflow-cpu==2.4.0
seaborn==0.11.1
Pillow==8.1.0

My setup.sh file:我的setup.sh文件:

mkdir -p ~/.streamlit/

echo "\
[server]\n\
headless = true\n\
port = $PORT\n\
enableCORS = false\n\
\n\
" > ~/.streamlit/config.toml

My Procfile :我的Procfile

web: sh setup.sh && streamlit run site.py

I've tried several different versions of Streamlit but I always get the same the same error.我尝试了几种不同版本的 Streamlit,但我总是得到相同的错误。 Any help would be greatly appreciated!任何帮助将不胜感激!

Change the name of your site from site.py to something else, for example my_site.py .将您的站点名称从site.py更改为其他名称,例如my_site.py Streamlit tries to import a module called site but your file is named site.py . Streamlit 尝试导入一个名为site的模块,但您的文件名为site.py

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError:将我的 Django 应用程序迁移到 Heroku 时,没有名为“Django-Banking-App.settings”的模块 - ModuleNotFoundError: No module named 'Django-Banking-App.settings' when migrating my Django app to Heroku 将 Flask 应用程序部署到 Heroku 时出现“ModuleNotFoundError: No module named 'app'” - Getting "ModuleNotFoundError: No module named 'app'" when deploying Flask app to Heroku Heroku Django ModuleNotFoundError:没有名为“my_app”的模块 - Heroku Django ModuleNotFoundError: No module named 'my_app' 出现错误 => ModuleNotFoundError: No module named 'django' 当我尝试将 django 应用程序部署到 heroku 时 - Getting Error => ModuleNotFoundError: No module named 'django' When I attempt to deploy my django app to heroku 基于诗歌的 Dockerized Streamlit 应用程序 - ModuleNotFoundError:没有名为“Lib”的模块 - Dockerized streamlit app based on poetry - ModuleNotFoundError: No module named 'Lib' Heroku 应用程序:ModuleNotFoundError:没有名为“pwa”的模块 - Heroku app: ModuleNotFoundError: No module named 'pwa' ModuleNotFoundError:Heroku上的Flask应用程序没有名为“ manage”的模块 - ModuleNotFoundError: No module named 'manage' with Flask app on Heroku heroku 上的 Django 应用程序,ModuleNotFoundError:没有名为“spread”的模块 - Django app on heroku, ModuleNotFoundError: No module named 'spread' HEROKU 应用程序 ModuleNotFoundError:没有名为“numpy”的模块 - HEROKU app ModuleNotFoundError: No module named 'numpy' ModuleNotFoundError:部署到heroku时没有名为“useracc”的模块 - ModuleNotFoundError: No module named 'useracc' When deploying to heroku
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM