PythonAnywhere ImportError:没有名为wsgi的模块
问题描述:
我正在将django应用程序部署到PythonAnywhere。 环境我使用的是: 的Python 2.7 的Django 1.8PythonAnywhere ImportError:没有名为wsgi的模块
在_pythonanywhere_com_wsgi.py,我有:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
当我运行它,它给错误为:
ImportError: No module named wsgi
它的解决方案是什么?
答
设置pythonpath
到wsgi.py
位于
你确定你安装的Django的正确版本到您的virtualenv? – Glenn
我已经安装了django 1.8及以上两行应该可以工作 –
然后可能是安装出了问题。尝试删除您的virtualenv,重新创建并重新安装。 – Glenn