本文介绍了没有名为Django的模块:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Windows环境中部署Django项目.我正在使用:-
I want to deploy my Django project in windows environment.I'm using:-
Windows7 64bit
Apache2
python2.7
Django 1.8
VCforPython
在安装所有必需的依赖项之后
And after installing all required Dependencies
我已将环境变量设置为:-
I have set my Environment Variables for:-
Variable name:PATH
variable value:my python path
variable name: DJANGO_SETTINGS_MODULE
variable value:project.settings
还有我的httpd.conf:-
And my httpd.conf:-
<VirtualHost *:80>
ServerName http://localhost
WSGIScriptAlias / C:\Apache2\htdocs\project\project\wsgi.py
<Directory "C:\Apache2\htdocs\project">
Require all granted
</Directory>
</VirtualHost>
但是当我尝试在localhost/中查看我的项目时,我得到了没有名为Django的模块"
But when i try to view my project in localhost/ i got "no module named Django"
错过了什么?
推荐答案
尝试以下操作以确保从任何路径中都选择了django.
Try following to make sure that django is picked from any of the path.
import sys
sys.path
这篇关于没有名为Django的模块:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!