Question

I want to run the file setup.py on location (64-bit Windows 7):

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

As I open cmd in that location (directory) and type:

python setup.py install

I get the error:

'python' is not recognized as an internal or external command, operable program or batch file

I assume that the problem is in system variable path because it is too long?

I would like to ask you how can I modfy the system variable path list. Now it looks like this:

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

I don't know if I can remove subfolders path if there is main folder in path already? For example; I have on path main python folder (that is: C:\Python27) and can I then remove all subfolders that are in system variable path (or not?):

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;
Was it helpful?

Solution

And Python should be in you system PATH variable. (path_till_python.exe directory). This will make your cmd realize python command. Also try this old post for PYTHONPATH setup, which I don't think is useful here, but still keep it handy for your reference.

EDIT

  1. Navigate to: c:\Python27\Lib\site-packages\xlutils-1.6.0\

  2. Then give the full absolute path to your python executable:

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top