Problems upgrading to Python 3

Hello. I’m starting with this lesson. But I’m having trouble upgrading to Python 3. I’m on Mac OS Big Sur 11.6 and even though I installed the latest version of Python 3 on this page, my command line terminal still defaults to Python 2.7. What do I need to do next and/or what am I doing wrong? Thanks!

While not clear of the commands you will issue, it sounds like a simple matter of updating the PATH variable. Navigate to the Python 3 install folder and set that file path into your environment. Note also that there is a Scripts folder inside that one. This is the one Python defaults to when saving code. The path may be useful to have noted, or at least bookmarked. I save all my own files in that one, and others’ code in folders on my other disk volume.

Thanks for your reply. I don’t know how to do this. Is there a good explainer somewhere?

1 Like

As yet, we’re waiting. Have you explored the environment variable, PATH?

Have you located where the .exe file for Python 3 is in your file system?


Spoiler, the URI is already in a system menu somewhere. The installer would have left a way for us to fire up the program. There is a likelihood it will be in the desktop menu for Mac or Win (or Linux?). Maybe even a taskbar link, which is what I always insist on with any install. Query the properties of that shortcut and therein will be the path to the executable we’re after.

You could just type, python3 into the shell in terminal to get to that version of python.
But, also…
Take a look at this thread:
https://discuss.codecademy.com/t/pipenv-version-leads-to-zsh-command-not-found-pipenv/597323/12

I think there’s a link for the explanation of what the PATH variable is too. If not, try here:

Also,

1 Like

Totally worked! And very informative! THANK U :heart_eyes: :smiling_face_with_three_hearts: :star_struck:

1 Like

Thank you for this! :grinning:

1 Like