-1
其实我想在Heroku上部署我的应用程序,我总是得到这个例外在Heroku上的日志,因为我使用Python 3.6.3oduleNotFoundError:无模块名为“os.environ”
2017-10-09T22:14:05.288072+00:00 heroku[web.1]: State changed from crashed
to starting
2017-10-09T22:14:07.772902+00:00 heroku[web.1]: Starting process with
command `python BookmarkServer.py`
2017-10-09T22:14:10.065235+00:00 app[web.1]: import os.environ
2017-10-09T22:14:10.065239+00:00 app[web.1]: ModuleNotFoundError: No module
named 'os.environ'; 'os' is not a package
2017-10-09T22:14:10.064976+00:00 app[web.1]: Traceback (most recent call
last):
2017-10-09T22:14:10.064990+00:00 app[web.1]: File "BookmarkServer.py",
line 47, in <module>
2017-10-09T22:14:10.158467+00:00 heroku[web.1]: Process exited with status 1
2017-10-09T22:14:10.179803+00:00 heroku[web.1]: State changed from starting
to crashed
从你的Python文件中的代码添加到你的问题的一个更好的答案。 –
这里有一个类似的问题:https://stackoverflow.com/questions/23048129/python-name-os-is-not-defined可能有帮助。 –