【问题标题】:Deploy a Python app on App Engine leads to Error 500在 App Engine 上部署 Python 应用程序导致错误 500
【发布时间】:2019-07-12 09:24:39
【问题描述】:

我想使用 Google App Engine 部署我的 Python 应用。它在 Google Cloud Shell 上本地运行。但是使用命令 google app deploy 生成的 URL 我得到错误 500。在日志中,我可以看到:

import Dash
No module named dash

但是,我已经使用命令pip install dash 安装了这个模块。 我的 Python 应用使用 2.7 版。

import dash
import dash_core_components as dcc
import dash_html_components as html

import plotly.graph_objs as go

import pandas

df = pandas.read_csv('abc.csv')  # csv file dataset

df.head()


classes = df['Class'].unique()

app = dash.Dash()

app.layout = html.Div([

#layout part
#function part

if __name__ == '__main__' :
    app.run_server(debug=True, host='127.0.0.4')

【问题讨论】:

  • 将破折号添加到您的 requirements.txt 并运行命令 pip install -r requirements.txt medium.com/python-pandemonium/…
  • @frankegoesdown Python 2.7 运行时不使用requirements.txt

标签: python google-app-engine google-cloud-platform plotly-dash


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 2021-03-19
  • 1970-01-01
  • 2020-08-29
  • 2019-03-20
  • 1970-01-01
  • 2017-11-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多