1

I have more than 40 folders are added into search PATH on my Windows 7 machine. I used to put Python environment in the User PATH. Yesterday the system can't find python.exe suddenly... I tried to move the folder path to System PATH and the problem solved.

But today, I installed Tex live package on my machine. By default, the path of C:\texlive\2015\bin\win32 was added to User PATH. System can't find any file under this folder. Then I tied to move C:\texlive\2015\bin\win32 to the end of System PATH. System still can't find any file in this folder... Finally, I tried to paste C:\texlive\2015\bin\win32 at the beginning of System PATH, than it works (all the files in this folder can be searched).

can some one explain why I put the path to the end it doesn't work but when I put the path at the beginning it works? I prefer to put some path to User PATH, I don't know why now them can't be searched?

aaronzs
  • 69
  • 7
  • 2
    This really doesn't have anything to do with Python. You might be better off asking on [superuser](https://superuser.com/). – Morgan Thrapp Jul 01 '15 at 19:30
  • 3
    Combining the system `PATH` with a user value truncates the final size to 1024 characters. There's also a limit of 2048 characters for loading just the system value. OTOH, in a process the length is limited by the size of the environment block, which defaults to 32768 characters in total for all environment variables. This means it's best to use a batch file to extend a minimal system `PATH` in a command prompt, like what Visual Studio vcvarsall.bat does. – Eryk Sun Jul 02 '15 at 04:10
  • 1
    this link https://stackoverflow.com/questions/4405091/how-avoid-over-populate-path-environment-variable-in-windows may find some solutions. – aaronzs Jul 06 '15 at 10:55

0 Answers0