1

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;
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
lskrinjar
  • 5,483
  • 7
  • 29
  • 54

1 Answers1

1

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

Community
  • 1
  • 1
Vivek
  • 910
  • 2
  • 9
  • 26
  • I have not expressed myself clearly. The upper list is the path at system variable. I have also look at the link you suggested and created new (PYTHONPATH) system variable. Restart the PC and still get the error. Any more suggestions? – lskrinjar Oct 14 '13 at 09:15
  • I see you already have python in your system "PATH" variable. If you have permission, can you join this chat: http://chat.stackoverflow.com/rooms/39171/python-path-setting – Vivek Oct 14 '13 at 09:36
  • The other easier way to do the same is to give absolute path. Look at the edit. – Vivek Oct 14 '13 at 09:41
  • Thanks for the help and suggestions. It works. One solution to this problem is also to add `C:\Python27` to PATH in user variables after `%WinDir%\System32;` to look like this:`%WinDir%\System32;C:\Python27`.The problem that I would still like to discus here is about the length of the `PATH` in environment variables. After I installed new software and when I ran, it made an error.Net framework couldn't be loaded (or smthng). And when I removed some unusefull programs from the `PATH` and software started ok. I assume that there's to be some connection about that or am I totally wrong? – lskrinjar Oct 14 '13 at 10:42
  • You can accept my solution if it worked for you, by stackoverflow convention. Well for DotNet Framework, you need to check the compatibile version of .net framework and install it in your system. – Vivek Oct 14 '13 at 10:50
  • Thanks for the reminder and help. Your suggestion solved it, but I see it more as a temp. solution. I have to point out that python's working w/o error unitl now. And I think, it's something to do with length of PATH of system variables. As I said I installed new software (solidworks 2013) and during inistallation it also installed the required .NET framework, but because the path was then too long it couldn't initialize .NET framework after I ran the program. Than I removed some programs from PATH and the program stared w/o problems. I think the issue is with the length of the PATH or not? – lskrinjar Oct 14 '13 at 16:51
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/39202/discussion-between-user2364223-and-vivek) – lskrinjar Oct 14 '13 at 17:21