简体   繁体   English

如何在Windows 7中获取django-admin.py命令

[英]How to get django-admin.py command working in windows 7

I have installed django 1.6.4 on my windows 7 (32-bit) machine, I'm using python 2.7.6 我已经在Windows 7(32位)计算机上安装了django 1.6.4,我正在使用python 2.7.6

But when i started to create my project by using following command: 但是当我开始使用以下命令创建项目时:

C:\django-admin.py startproject mysite

it doesn't create any folder named mysite under my current directory, instead it just simply runs the django-admin.py script, in fact no matter what i type after django-admin.py command i get the output of django-admin.py script on the command prompt. 它不会在当前目录下创建任何名为mysite的文件夹,而是仅运行django-admin.py脚本,实际上,无论我在django-admin.py命令后键入什么内容,我都会得到django-admin的输出。 py脚本在命令提示符下。

C:\django-admin.py startproject mysite
C:\django-admin.py abcdefghi

both of the above commands just simply runs the django-admin.py script and does nothing else. 上面的两个命令都只是运行django-admin.py脚本而没有执行任何其他操作。

I checked online but i couldn't seem to find out the actual problem. 我在网上检查了一下,但似乎找不到真正的问题。

I have set all the environment variables of python and of django 我已经设置了python和django的所有环境变量

Path= C:\\Python27\\;C:\\Python27\\Scripts 路径= C:\\ Python27 \\; C:\\ Python27 \\ Scripts

According to this : 根据

https://docs.djangoproject.com/en/dev/1.6/django-admin/ https://docs.djangoproject.com/en/dev/1.6/django-admin/

For Windows users, who do not have symlinking functionality available, you can copy django-admin.py to a location on your existing path or edit the PATH settings (under Settings - Control Panel - System - Advanced - Environment...) to point to its installed location. 对于没有符号链接功能的Windows用户,您可以将django-admin.py复制到现有路径上的某个位置,或编辑PATH设置(在“设置-控制面板-系统-高级-环境...”下)以指向到其安装位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM