我正在尝试在Windows 7上安装Django-1.5.5。我已经安装了它但是当我尝试打入时#j; django-admin.py startproject mysite"我收到以下错误:
C:\Users\DIPANSHU>django-admin.py startproject mysite
Traceback (most recent call last):
File "C:\Django-1.5.5\django\bin\django-admin.py", line 2, in <module>
from django.core import management
File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
9, in <module>
from django.core.management.base import BaseCommand, CommandError, han
fault_options
File "C:\Python27\lib\site-packages\django\core\management\base.py", lin
in <module>
from django.utils.encoding import force_str
File "C:\Python27\lib\site-packages\django\utils\encoding.py", line 10,
dule>
from urllib import quote
File "C:\Python27\lib\urllib.py", line 26, in <module>
import socket
File "C:\Python27\lib\socket.py", line 47, in <module>
import _socket
ImportError: DLL load failed: The specified procedure could not be found.
以前,我尝试使用Django-1.4.2,但问题是一样的。我有Python27.Please协助。
答案 0 :(得分:1)
Yups!终于明白了!所以这就是我所做的:
注意:如果您的Python安装在C:\Python27\
中,则需要将以下路径添加到PATH: C:\Python27\;C:\Python27\Scripts;
参考:https://docs.djangoproject.com/en/dev/howto/windows/
非常感谢您的宝贵意见和对我的支持! : - )
答案 1 :(得分:0)
我会确保通过运行
安装DJangopython -c&#34; import django;打印(django.get_version())&#34;
https://docs.djangoproject.com/en/1.6/intro/tutorial01/
我发现他们网站上的Django教程非常好
您还在输入命令提示符的确切内容是什么?你应该只是在目录C:\ Users \ DIPANSHU&gt;在命令shell中
编辑:你应该在你安装Django的目录