0

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.

4
  • 5
    Did you add python to your path? Does it work for the regular command prompt or is it powershell specific? Commented Jun 18, 2013 at 22:06
  • 1
    Also, 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. Commented Jun 18, 2013 at 22:07
  • 2
    Type $env:path in powershell and see if the directory for python.exe is in there. If not the other comments have good suggestions. Commented Jun 18, 2013 at 22:12
  • In response to Colonel Panic: It doesn't work in the command prompt either Commented Jun 20, 2013 at 0:29

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

For some reason, whenever I exit powershell, this undoes itself and I have to type in all the code again. Any ideas why?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.