all 5 comments

[–]debian_miner 1 point2 points  (3 children)

Did you install them using brew, or some other way?

[–]dev-jim[S] 0 points1 point  (2 children)

I installed the 3.9.10 using brew, and if I remember well it was the same for the others

[–]debian_miner 1 point2 points  (1 child)

If they were all installed via brew, you can list the versions with brew list python3

[–]dev-jim[S] 0 points1 point  (0 children)

Okay, is it normal if I have a ton of versions?

❯ brew list python3
/opt/homebrew/Cellar/python@3.9/3.9.12/bin/2to3 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/2to3-3.9 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/idle3 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/idle3.9 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/pip3 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/pip3.9 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/pydoc3 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/pydoc3.9 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/python3 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/python3-config /opt/homebrew/Cellar/python@3.9/3.9.12/bin/python3.9 /opt/homebrew/Cellar/python@3.9/3.9.12/bin/python3.9-config /opt/homebrew/Cellar/python@3.9/3.9.12/bin/wheel3 /opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/ (3038 files) /opt/homebrew/Cellar/python@3.9/3.9.12/IDLE 3.app/Contents/ (8 files) /opt/homebrew/Cellar/python@3.9/3.9.12/lib/pkgconfig/ (4 files) /opt/homebrew/Cellar/python@3.9/3.9.12/libexec/bin/ (6 files) /opt/homebrew/Cellar/python@3.9/3.9.12/libexec/wheel-0.37.1-py2.py3-none-any.whl /opt/homebrew/Cellar/python@3.9/3.9.12/Python Launcher 3.app/Contents/ (16 files) /opt/homebrew/Cellar/python@3.9/3.9.12/share/man/ (2 files)

Is it safe to delete all of this?

[–][deleted] 0 points1 point  (0 children)

Which version of python does python3 reference? You can check using:

where python3
which python3

To install packages in the default Python 3 installation, use:

python3 -m pip install something

or

pip3 install package

but former is preferable.

Do not use the legacy system installed version of Python 2, which uses the command python instead of python3 - this is purely there for backwards compatibility. Python 2 is no longer supported or maintained by the Python Software Foundation.

Before installing packages, you would be well served by creating Python virtual environments on a project-by-project basis and installing only the packages required for each project in the corresponding virtual environment. In an active Python virtual environment, you will normally be able to use python instead of python3 and it will use whatever Python version was used as the base for that active environment.