-1

See Photo1. On executing --version, which and where command to python and python3, I discover to have python linked to ver 3.11 and python3 linked to 3.9.

See Photo2. I search all python related paths and see a few 3.9 paths and majority are 3.11 paths

Question:

What is the best way to 'gracefully' delete 3.9 and all its references?

a). Should i simply manually delete all 3.9 folders shown in Photo2? I fear if I break anything else unintentionally...

b). Also, would like to make python and python3 point to the 3.11

I believe this issue is rootcause to my previous post on pycaret installation: Pycaret installation on Mac unsuccessful via pip

enter image description here enter image description here

8
  • 1
    You should not delete the old versions. MacOS uses Python for many of its internal processes, and it absolutely relies on the version that was shipped with the OS. If you have installed one through HomeBrew, it can be deleted, but not the ones in /Library. Commented Sep 4, 2023 at 17:00
  • 4
    When there are multiple version of python on a system, it's best to use pip as a module python3 -m pip Commented Sep 4, 2023 at 17:02
  • 2
    No screenshots of text or code! Instead you should copy-paste the text or code into your question. Commented Sep 4, 2023 at 17:05
  • snarky.ca/why-you-should-use-python-m-pip Commented Sep 4, 2023 at 17:05
  • @sinoroc in this case, the image is fine, it's not code or error text that needs to "work" or that needs to be text so folks can copy and search for it themselves, it's just a piece of evidence to show off that there are a million where results, the post would still be complete without them. Commented Sep 4, 2023 at 17:15

1 Answer 1

0

This is a poor question because it is attempting to get a response to poor practice.

Please take a different approach and consider creating a virtual environment for each project you work on.

Deleting system installed Python is not recommended.

A quick Google search for best practice for Python Environments will yield a more productive avenue for you to approach your problem.

My personal favorite is Poetry, however I would suggest you try a couple.

The first result I got has a reasonable approach outlined.

Additionally you may like to read the question and answers here:

What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?

Sign up to request clarification or add additional context in comments.

2 Comments

its a catch22 situation. because i dont know the 'good practice' yet, i will seek inputs to learn 'good practice' ... only to be labeled as a 'poor question' and get a dent to my rating/reputation. I suppose Chatgpt is the only savior which doesnt judge you for asking 'dumb' question in the court of nobel savvy coders living in their high castle.
Your reputation will recover, and the question has been answered to help you,

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.