Help with initial Python download

Hi folks, I bought Learn Python the Hard Way (3rd edition, was using Python 2.7) a few years ago and had downloaded Python no problem etc but had to pause.

Fast forward to today, I want to re-boot learning, still with the 3rd edition book but with a brand new computer. The problem Income across is anytime I type in ‘python’, in Powershell, I get a pop-up from the Microsoft Store wanting me to ‘get’ Python 3.8.

I know I should still be able to get Python 2.7 and use but currently not sure how to get around this. Any ideas? I know it’s a bit backasswards but I know in book it always said to try to get Python 2, not Python 3 so am trying to go along those lines. Thanks!!

Assuming that you have Python 2.7 installed, the python executable is probably not in your PATH.

Hit the windows key and type path. You should get a search result like “Edit environment variables”. Go there, click “environment variables” and find the “Path” entry in the list in the bottom half of the dialog. Edit this to add the directory where your Python executable is installed.

1 Like

Given that Python 2 is no longer being supported, I would question the choice to stick with Python 2. To be honest, from a LPTHE perspective, there are only really a few changes which you’ll soon pick up.

Off the top of my head, print(), f-strings and raw_input removal, all of which are easier.

1 Like

Thats what I was thinking to. At the time Shaw was very adamant in the book about using Python 2 instead of Python 3 but I had wondered how far it had gotten, maybe to the point of going with it…

1 Like

Well Python 3 is now at 3.8.x as stable and about to got 3.9 shortly. Quite a bit has happened with Python since the original book was penned. Such is software I suppose!

1 Like

I do concur. There probably has been enough time in between the printing and now that P3 would be more warranted. Thanks for the insight!

1 Like
A free service run by Zed A. Shaw for learncodethehardway.org.