python - 使用 google colab 创建 Streamlit Web 应用程序进行基本图像分类 Web 应用程序时出错

标签 python web-deployment streamlit

我正在尝试创建一个简单的分类网络应用程序,引用文章 -https://towardsdatascience.com/deploying-an-image-classification-web-app-with-python-3753c46bb79 。 我正在 Google colab env 中尝试这篇文章,在创建 Streamlit Web 应用程序时,我在运行命令行期间收到以下错误 - streamlit 运行 rps_app.py 错误

ContextualVersionConflict                 Traceback (most recent call last)
<ipython-input-15-7d4ea1e3639a> in <module>()
      1 import numpy as np
----> 2 import streamlit as st
      3 import tensorflow as tf
      4 from PIL import Image, ImageOps
      5 

4 frames
/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py in resolve(self, requirements, env, installer, replace_conflicting, extras)
    789                 # Oops, the "best" so far conflicts with a dependency
    790                 dependent_req = required_by[req]
--> 791                 raise VersionConflict(dist, req).with_context(dependent_req)
    792 
    793             # push the new requirements onto the stack

ContextualVersionConflict: (ipykernel 4.10.1 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('ipykernel>=5.1.2; python_version >= "3.4"'), {'pydeck'})``

最佳答案

您是否尝试重新启动运行时并再次运行?它对我有用。

关于python - 使用 google colab 创建 Streamlit Web 应用程序进行基本图像分类 Web 应用程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63100640/

相关文章:

python -m 导致 "Error while finding module specification for"

python - 使用streamlit Python代码找不到上传文件的路径

streamlit - 没有名为 streamlit.__main__ 的模块; ‘streamlit’ 是一个包,不能直接执行

web-applications - docker : How To Dockerize And Deploy multiple instances of a LAMP Application

node.js - 如何将 MEAN.js (Node.js) 应用程序部署到生产环境

javascript - Spring boot 和 react 在 tomcat 上运行

python - AWS 上的 Streamlit : serverless options?

Python 从字典中删除值适合函数的项目?

python - python 3.5+ 中的类型提示克隆函数

Python webapp2 : redirect back