Setting environment variables in windows 7

2019-06-06 20:47发布

问题:

I am trying to set my environment variable in windows 7 so that I can call prolog from the command line. I went into the environment variables under system settings, and edited it so that it looks like this.

C:\Python27;C:\Program Files (x86)\Notepad++;C:\Program Files\pl\bin\prolog;

I'm not sure what I did wrong here, as I keep getting the message

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

Both Python and Notepad++ work just fine the way I have them, and I have double checked to make sure my path name is correct. I DID change the name of the prolog executable from swipl-win to prolog, but that shouldn't make a difference, as I did this with python as well (python changed to python27). Am I missing something blatantly obvious?

回答1:

Is prolog (the executable) inside a folder also called "prolog"? If it's inside "bin", your path should be:

C:\Python27;C:\Program Files (x86)\Notepad++;C:\Program Files\pl\bin;

(that's probably the case, since in my system - I have Swi-Prolog in Windows XP - there is a folder called "bin", no subfolders, with the executable plwin.exe inside it)



回答2:

If you are using SWI-Prolog then add below path in your PATH environment variable:

For 64 bit system/installation: C:\Program Files\swipl\bin

For 32 bit system/installation: C:\Program Files (x86)\swipl\bin



回答3:

is the path correct? Your notepad++ runs from 'C:\Program Files (x86)\'... your prolog runs from '\Program Files\'....