Python Forum

Full Version: Impossible to cleanly uninstall Python 3.8.9
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am using a Mac M1 running macOS Monterey 12.5.1.

[Context]

Trying to perform a clean install a package called FreqTrade, I run into the following error:

"ERROR:: Could not find a local HDF5 installation. You may need to explicitly state where your local HDF5 headers and library can be found by setting the HDF5_DIR environment variable or by using the --hdf5 command-line option."

Since I have been able to install it before and now I can't, I wanted to do a clean wipe of all Python packages installed (via homebrew and via Standard Application download from Python website)

I have now uninstalled everything python related both in my Applications folder as well as in Homebrew, however, whenever typing "python3 --version" in my CLI, it shows a version of Python 3.8.9 installed.

Issue

I am unable to understand where this version is installed so far. Hence I don't know how to remove it.

I have followed various pages that explain how to do so, such as this one and yet the version of Python 3.8.9 keeps popping whenever doing "python3 --version"

'Funnily' enough, whenever I try to run the script to install FreqTrade package again, it says that no version of Python is installed (which makes sense since I felt I had uninstalled them all).

Any pointers? I am at the point where I'd almost reset my Mac but I'd like to avoid that if possible :)

Thanks a lot in advance.

Have a great day,

François.
Disclaimer: I know nothing about Mac OS
(Sep-01-2022, 07:16 AM)Ftaniere Wrote: [ -> ]I am unable to understand where this version is installed so far. Hence I don't know how to remove it.
If you want to know where python is, run
Output:
python3 -c "import sys; print(sys.executable)"
Python 3.8.9 should be the default version macOS Monterey 12.5.1.
You should just leave default version alone and not uninstall it,this is always the advice for default Python version on Mac and Linux.
It would probably go ok to remove it,there has been many problems trough the years as OS had dependencies on default Python version.

So what to do?
Just leave default alone and install a new version eg Install Python 3 on macOS (Monterey 12.5)
The right and wrong way to set Python 3 as default on a Mac
I like the option best in last link where use pyenv(a safe and easy way to install newest Python versions(or eg Anaconda) and also switch between versions).
I don't use Mac as info.