0

我正在尝试第一次安装 django 并尝试通过http://net.tutsplus.com/tutorials/python-tutorials/python-from-scratch-creating-a-dynamic-website/工作。

我已经下载了 Django-1.4.3。这是我的 Git-Bash 目录

$ ls
Django-1.4.3     ReleaseNotes.rtf  doc           git-cheetah  libexec
Git Bash.vbs     bin               etc           git-cmd.bat  share
README.portable  cmd               git-bash.bat  lib          ssl

根据教程我必须执行:

cd Django-1.4.3
python setup.py install

当我做后者时,我得到:

$ python setup.py install
sh.exe": python: command not found

我需要把python放在哪里才能让它执行这个命令?

4

1 回答 1

3

Assuming that Python is already installed, this error message means that Git-Bash doesn't know where your python.exe is.

To run the python command from the Git-Bash like you proposed, you have to append the path of python.exe in the PATH environment variable of Windows.

Other way to run python on Windows is using the normal command prompt (instead of Git-Bash) using the full path. For example, if the installation directory of python is C:\Python27:

cd Django-1.4.3
C:\Python27\python.exe setup.py install
于 2013-01-21T22:18:16.220 回答