I am attempting to learn the very basics of Python using the guide "Learn Python the hard way" by Zed A. Shaw. The problem that I am having is that I can run Python scripts, but only when using .
in front of the name. This opens up CMD for a split second and then closes.
If I attempt to run the file it returns that the file is not an operable program file, script, etc..
I've found multiple questions on Stack Overflow that relate to this question, but none of the solutions have worked for me.
Two things I've tried:
[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:Python27", "User")
and
$env:PATH =$env:PATH+";."
Source:
(How do you remove the PowerShell requirement that scripts and executables be preceded by "."?)
When I check the environment variable PATH it has the correct path within it, so what other things could be causing this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…