For some reason, whenever I type 'python' into powershell, it tells me that 'python' is not recognized. I know that it works on other people's computers, so I am wondering what I am doing wrong. I know that this is vague, but I really have no idea what i am supposed to do. I am using the python from python.org. Thank you so much.
-
5Did you add python to your path? Does it work for the regular command prompt or is it powershell specific?Colonel Panic– Colonel Panic2013-06-18 22:06:05 +00:00Commented Jun 18, 2013 at 22:06
-
1Also, if you already had powershell running before adding python to your path (through the checkbox in the installer, or the System control panel, etc.), you may need to launch a new powershell instance.abarnert– abarnert2013-06-18 22:07:10 +00:00Commented Jun 18, 2013 at 22:07
-
2Type $env:path in powershell and see if the directory for python.exe is in there. If not the other comments have good suggestions.Andy Arismendi– Andy Arismendi2013-06-18 22:12:49 +00:00Commented Jun 18, 2013 at 22:12
-
In response to Colonel Panic: It doesn't work in the command prompt eitherHAL 9000– HAL 90002013-06-20 00:29:45 +00:00Commented Jun 20, 2013 at 0:29
Add a comment
|
1 Answer
Try first with adding python to your path:
$env:Path = $env:Path + ";C:\Program Files\Python\"
Note that the path may differ on your machine.
Btw for PS - Python integration you might want to play with IronPython: Embedding IronPython in PowerShell.
1 Comment
HAL 9000
For some reason, whenever I exit powershell, this undoes itself and I have to type in all the code again. Any ideas why?