Trying to install SWI-Prolog for Windows 8.0.3 (64-bit) and I select to modify the PATH variable for all users. I get the error message:
“Warning! PATH too long installer unable to modify PATH!”
The installation is done, but I cannot use JPL for a Java->Prolog application.
Is there a way to manually modify the PATH variable afterwards? WHat is the correct path to be added?
I recall this error but what exactly created the error? An install wizard, are you trying to change the path or something else. A screen shot would be helpful. The reason I ask is because this problem is common on Windows but not limited to installing SWI-Prolog and a screen shot would help others who find this.
Based on the info given my guess is that the Windows user path environment variable is near its limit and by adding the path to SWI-Prolog to the user path environment variable, you caused the limit to be exceeded.
You have a few choices.
- You don’t need SWI-Prolog path in the PATH variable to start or use SWI-Prolog; adding it to the PATH variable just makes it more convenient to start SWI-Prolog from a command line prompt. In other words you can start it from a command line by giving the full path, or what I prefer is to create a taskbar icon that starts SWI-Prolog when I click on it.
- You can increase the size for items in the PATH by referring to another variable that is used with PATH. Let me just give you the instructions and you will see.
System variables add a new system variable that will extend the path, e.g.
Now you have another 1024 characters for the path.
I tested this with
C:\Program Files\swipl\bin under
PATH_EXTENDED and it worked to open swipl.exe from the command line.
Thanks for the tip. It did not work though. Installer keeps saying that the the path is too long. The manual modification of the path worked fine.
Have you tried ‘long path tool’?
it’s very helpful for me.
sorry my bad … posted in the wrong group …
Just wanted to update as of August 2020 for anyone coming across this - The issue is still here (I have a bunch of stuff in my PATH variable, so it might just be that), but the workaround mentioned by EricGT (which is also described in the link provided by jan) works fine.
Yip. The main issue is in NSIS. There are some NSIS plugin ways to handle this, but they all seem pretty hairy to me. The CPack/CMake community suggests using one of the other package managers. If someone wishes to figure it out …
Note that the entire build and packaging environment for Windows has been dockerized. See https://github.com/SWI-Prolog/docker-swipl-build-mingw. That should make it fairly easy for anyone with Docker to build SWI-Prolog for Windows and get the environment to fix this.