Page 1 of 1
[SOLVED] Python PATH problem since the WAPT 2.6 update
Published: May 5, 2025 - 3:05 PM
by erems
Hello,
since the WAPT update from 2.5 to 2.6, several users have complained about their Python scripts.
It seems that the Python script embedded in the WAPT agent is in the system PATH and is therefore now called by default regardless of the session. Other Python installations usually use user environment variables.
For now, I'm having them add their Python path to the system variables above the WAPT path, but
1- this isn't very clean
, and 2- it might impact the WAPT agent.
Is there a better solution?
Thank you for your help.
Best regards.
Re: Python PATH problem since the WAPT 2.6 update
Published: May 5, 2025 - 3:43 PM
by dcardon
Hello Erems,
the corresponding xkcd:
https://xkcd.com/1987/
erems wrote: ↑May 5, 2025 - 3:05 PM
...
it seems that the Python embedded in the WAPT agent is in the system PATH and therefore it is now called by default regardless of the session. Other Python installations usually use user environment variables.
For now, I'm having them add their Python path to the system variables above the WAPT path, but
1- this isn't very clean
In the user PATH, does it point to Python installations located in %APPDATA% or in %PROGRAMFILES%?
2 - This may have an impact on the WAPT agent
No, that's not a problem. We did a lot of work cleaning up the Python search paths at wapt startup. By the way, the python.exe from python.org is rather unpredictable in its discovery of system DLLs, and we had to rewrite it to improve its behavior. In the wapt installation, the python.exe binary is actually the same as wapt-get.exe.
Is there a better solution?
We've been wanting to correct this behavior for a while so that there is only wapt-get.exe in the %PATH% (basically, create a subdirectory /bin/ with just wapt-get.exe in it).
Sincerely,
Denis
Re: Python PATH problem since the WAPT 2.6 update
Published: May 5, 2025 - 3:55 PM
by erems
We've been wanting to correct this behavior for a while so that there is only wapt-get.exe in the %PATH% (basically, create a subdirectory /bin/ with just wapt-get.exe in it).
It's certain that with that there would be no more possible confusion.
Otherwise, most of our local Python installations are in %APPDATA%.
Best regards.
Re: Python PATH problem since the WAPT 2.6 update
Published: May 5, 2025 - 4:08 PM
by sfonteneau
Yes, generally speaking, typing "python" in a terminal without the fullpath is really not deterministic.
For example, my path:
Code: Select all
PATH=C:\Program Files\Python313\Scripts\;C:\Program Files\Python38\Scripts\;C:\Program Files\Python39\Scripts\
So if I launch Python in my terminal, I won't necessarily get the Python version I'm expecting. Therefore, I never just launch "python"
Furthermore, if you type "python3" in the terminal on a Windows 10 system, it can also open the Microsoft Store...
So I would say that even if we correct the fact of not having wapt python in the path, the correct method is to type the fullpath of python.

Re: Python PATH problem since the WAPT 2.6 update
Published: May 6, 2025 - 3:22 PM
by erems
Thank you, I'll pass the message on to our team.
Best regards.