I’m trying to set pythonpath but when I follow in some example in other stackoverflow, I just get a red message or nothing happened.
In my picture, u can see, no my folder D:\DemoPython
Does anyone have exactly how to set it?, please give me some examples or the exact answer would be better. Thank so much.
>Solution :
The syntax for setting environment variables you found is for cmd.exe (the DOS-like prompt that has shipped with Windows for ages). You’re running in PowerShell, which is newer, and has significantly different syntax.
On PowerShell (which you’re using), you want:
$env:PYTHONPATH = "D:\DemoPath;${env:PYTHONPATH}"
or
$env:PYTHONPATH = "${env:PYTHONPATH};D:\DemoPath"
depending on whether you want to take precedence over existing entries or not, respectively.

