0

我想setup.py在位置上运行文件(64 位 Windows 7):

c:\Python27\Lib\site-packages\xlutils-1.6.0\

当我在该位置(目录)打开 cmd 并键入:

python setup.py install

我得到错误:

'python' 不是内部或外部命令、可运行程序或批处理文件

我认为问题出在系统变量路径中,因为它太长了?

请问如何修改系统变量路径列表。现在看起来像这样:

C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
C:\Program Files (x86)\AMD APP\bin\x86_64;
C:\Program Files (x86)\AMD APP\bin\x86;
C:\Users\lskrinjar\Documents\AMD APP\bin\x86_64;
C:\Users\lskrinjar\Documents\AMD APP\bin\x86;
C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;
C:\Program Files (x86)\PC Connectivity Solution\;
%CommonProgramFiles%\Microsoft Shared\Windows Live;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
c:\Program Files\Hewlett-Packard\Drive Encryption\;
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;
C:\Program Files\WIDCOMM\Bluetooth Software\;
C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;
C:\Program Files\Broadcom\Broadcom 802.11\Driver;
C:\Program Files\MATLAB\R2011b\runtime\win64;
C:\Program Files\SlikSvn\bin;
C:\Program Files (x86)\Graphviz 2.28\bin;
C:\FFmpeg\bin\;
C:\Program Files (x86)\SlikSvn\bin;
C:\Python27;
C:\Python27\DLLs;
C:\Python27\Scripts;
C:\Python27\Lib\site-packages\vtk;
C:\Python27\gnuplot\binary;
C:\Python27\Lib\site-packages\osgeo;
C:\Python27\Lib\site-packages\PyQt4;
C:\Program Files (x86)\pythonxy\SciTE-3.2.2-1;
C:\Program Files (x86)\pythonxy\console;
C:\MinGW32-xy\bin;
C:\Program Files (x86)\pythonxy\swig;
C:\Program Files (x86)\pythonxy\gettext\bin;
C:\Program Files (x86)\IVI Foundation\IVI\bin;
C:\Program Files\IVI Foundation\IVI\bin;
C:\Program Files\IVI Foundation\VISA\Win64\Bin\;
C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;
C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;
C:\Program Files\TortoiseSVN\bin;
C:\Program Files\Microsoft\Web Platform Installer\;
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;
C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;
C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;
C:\Program Files (x86)\CMake 2.8\bin\;
%MINGW_DIR%\bin

如果路径中已经有主文件夹,我不知道是否可以删除子文件夹路径?例如; 我有路径主python文件夹(即:C:\ Python27),然后我可以删除系统变量路径中的所有子文件夹(或不?):

C:\Python27\DLLs;
C:\Python27\Scripts;
C:\Python27\Lib\site-packages\vtk;
C:\Python27\gnuplot\binary;
C:\Python27\Lib\site-packages\osgeo;
C:\Python27\Lib\site-packages\PyQt4;
4

1 回答 1

1

并且 Python 应该在您的系统 PATH 变量中。(path_till_python.exe 目录)。这将使您的 cmd 实现 python 命令。也可以试试这篇关于PYTHONPATH设置的旧帖子,我认为它在这里没有用,但仍然保持方便供您参考。

编辑

  1. 导航到:c:\Python27\Lib\site-packages\xlutils-1.6.0\

  2. 然后给出你的 python 可执行文件的完整绝对路径:

    c:\Python27\python.exe setup.py install

于 2013-10-14T08:39:43.563 回答