Django 1.11.7我在虚拟环境中安装了python3.6 . 为什么Python / 3.5.2在这里?和
我无法访问网站127.0.0.1(500内部服务器错误)
[wsgi:error] [pid 61905:tid 140688926893824] [remote 127.0.0.1:33456] mod_wsgi(pid = 61905):目标WSGI脚本'/home/ubuntu/.../wsgi.py'无法作为Python模块加载 . [wsgi:error] [pid 61905:tid 140688926893824] [remote 127.0.0.1:33456] mod_wsgi(pid = 61905):处理WSGI脚本'/home/ubuntu/.../wsgi.py'时发生异常 . [wsgi:error] [pid 61905:tid 140688926893824] [remote 127.0.0.1:33456]回溯(最近一次调用最后一次):[wsgi:error] [pid 61905:tid 140688926893824] [remote 127.0.0.1:33456] File“ /home/ubuntu/.../wsgi.py“,第32行,在[wsgi:error] [pid 61905:tid 140688926893824] [remote 127.0.0.1:33456]来自django.core.wsgi import get_wsgi_application
[wsgi:error] [pid 61905:tid 140688926893824] [remote 127.0.0.1:33456] ImportError:没有名为'django'的模块
如何解决上述问题?
救命! THKS!
1 回答
读:
正如文档所述,您无法在从不同Python版本创建的Python虚拟环境中为一个Python版本编译mod_wsgi .
您的mod_wsgi必须针对您要使用的Python版本进行编译 .