0

Trying to learn Python using an educational book entitled, "Learn Python The Hard Way" and I am having a difficult time getting PowerShell to recognize Python. I installed Notepad ++ and started PowerShell...no problem. I was told that sometimes Windows doesn't configure Path correctly and was instructed to enter

[Environment]::SetEnvironmentVariable("Path","$env:Path;C:\Python27","User")

I entered the line above but Python isn't recognized even after a re-start. Any suggestions? I am a programming novice so please be as clear as possible with your answer. Thank you very much.

SteveDeL
  • 1
  • 2
  • possible duplicate of [Adding Python Path on Windows 7](http://stackoverflow.com/questions/6318156/adding-python-path-on-windows-7) – AlecBrooks Feb 10 '15 at 22:32

2 Answers2

0

You likely need to be navigated to the right directory. Try:

   cd ..
   C:\Python27\
Jonathan Epstein
  • 369
  • 2
  • 12
  • Thank you but could you be a little bit more specific. I am completely new to programming. Where should I enter cd.. or cd\Correct\Directory I know Pyrhon resides in C:\Python27\ – SteveDeL Feb 11 '15 at 21:16
  • Thank you very much..this is the first chance I got all week to try to solve my problem. Someone else on Stack told me to type Machine instead of User at the end of the command and it worked. I sure yours would also have done the trick. Thanks again!!! – SteveDeL Feb 14 '15 at 19:43
0

What you have worked fine for me. You could try possibly changing "User" to "Machine" and it would set that variable for the whole machine not just a user. Once executed, close your PowerShell windows and reopen and check again.

campbell.rw
  • 1,366
  • 12
  • 22