Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ModuleNotFoundError:没有名为';geventwebsocket&x27;_Python_Heroku_Flask_Websocket_Gunicorn - Fatal编程技术网

Python ModuleNotFoundError:没有名为';geventwebsocket&x27;

Python ModuleNotFoundError:没有名为';geventwebsocket&x27;,python,heroku,flask,websocket,gunicorn,Python,Heroku,Flask,Websocket,Gunicorn,无法使用gunicorn在Heroku cloud上运行我的web套接字网站。本地(“heroku local”)工作正常,但当我试图访问我的网站URL时,它崩溃了 日志: 2018-07-18T20:45:32.563241+00:00应用程序[web.1]:错误:类uri“geventwebsocket.gunicorn.workers.GeventWebSocketWorker”无效或未找到: 2018-07-18T20:45:32.563242+00:00应用程序[网站1]: 2018-

无法使用gunicorn在Heroku cloud上运行我的web套接字网站。本地(“heroku local”)工作正常,但当我试图访问我的网站URL时,它崩溃了

日志:

2018-07-18T20:45:32.563241+00:00应用程序[web.1]:错误:类uri“geventwebsocket.gunicorn.workers.GeventWebSocketWorker”无效或未找到:

2018-07-18T20:45:32.563242+00:00应用程序[网站1]:

2018-07-18T20:45:32.563244+00:00应用程序[web.1]:[回溯(最近一次呼叫):

2018-07-18T20:45:32.563246+00:00应用程序[web.1]:文件“/app/.heroku/python/lib/python3.6/site packages/gunicorn/util.py”,第132行,装入类

2018-07-18T20:45:32.563247+00:00应用程序[web.1]:mod=import('.'.join(组件))

2018-07-18T20:45:32.563249+00:00应用程序[web.1]:ModuleNotFoundError:没有名为“geventwebsocket”的模块。

2018-07-18T20:45:32.563250+00:00应用程序[网站1]:]


包名如所述
gevent websocket
,因此

conda activate <env-name>
conda install gevent-websocket

取决于您是否使用anaconda。

您可能需要安装gevent websocket:
pip安装gevent websocket
我已经安装了它。实际上,“heroku local”命令和localhost都能正常工作。似乎geventwebsocket模块目录不在heroku应用程序文件夹中,我该如何修复?
pip install gevent-websocket