2

I'm currently using Mac Pro and downloaded python through brew install python for the latest version (though it downloaded 3.9.12 instead of 3.10.x).

Also, while playing with the command lines, I also installed pyenv (version 2.2.5).

The problem is, I am now unable to get the default python version. The command python --version and python -h all gives me zsh: command not found: python.

However, when I do python3 --version, it gives me Python 3.9.12.

Did I mess things up? Is there are way to go back to the state before I altered anything? (or at least recover my default python version?)

Learner_15
  • 399
  • 2
  • 11
  • `/usr/bin/python3`, you can use `whereis python3` to know it's location – sahasrara62 Apr 04 '22 at 04:45
  • II'm actually trying to look for the default python rather than python3.. Is there a way? The `whereis python` just gives me the result of `python:` – Learner_15 Apr 04 '22 at 04:52
  • this may help [python-location-on-mac-osx](https://stackoverflow.com/questions/6819661/python-location-on-mac-osx) – sahasrara62 Apr 04 '22 at 04:53
  • hmm.. I'm not being able to get the specific answer I wish to get... Would this mean that I am unable to recover the default python of the macos? (which I remember is the python 2 version) – Learner_15 Apr 04 '22 at 05:08
  • Are you sure you have Python2 installed to begin with? I'm writing from a Mac pro as well, and I'm getting the same results as you are. – Carlo Apr 04 '22 at 06:19
  • really? I guess then this is normal? Cos when I started my python right after I bought Mac pro, I got the results that it had a default python of version 2.7.x. After installing python 3.x.x, the `python --version` disappeared and only the `python3 --version` is showing. – Learner_15 Apr 04 '22 at 14:02
  • Does this answer your question? [python location on mac osx](https://stackoverflow.com/questions/6819661/python-location-on-mac-osx) – aaossa Apr 05 '22 at 13:35
  • I was recommended this page earlier, but it doesn't really answer my question... I'm currently actually guessing that either the default python version was deleted from the mac pro somehow while I was fidgeting around :( – Learner_15 Apr 06 '22 at 01:47

1 Answers1

0

What version of MacOS are you running? Starting in 12.3, Python2 was removed from the system.

https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes

Python Deprecations Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead. (39795874)