Search code examples
pythonpowershellpython-2.7

I'm trying to use Python in PowerShell


I'm trying to follow Zed Shaw's guide Learning Python the Hard Way. I need to use Python in PowerShell.

I have Python 2.7.3 installed in C:\Python27. Whenever I type python into a PowerShell window, I get an error that says:

the term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program.

I also typed in this: [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27", "User")

That was a suggested solution provided, but typing python into a PowerShell window still does nothing. I can type in "start python" and it opens up a window with Python, but I need it in PowerShell.


Solution

  • Try setting the path this way:

     $env:path="$env:Path;C:\Python27"