No module named Django:

半腔热情 提交于 2019-12-25 04:05:07

问题


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

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>

But when i try to view my project in localhost/ i got "no module named Django"

What did miss??


回答1:


Try following to make sure that django is picked from any of the path.

import sys
sys.path


来源:https://stackoverflow.com/questions/40926512/no-module-named-django

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!