问题
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