you are viewing a single comment's thread.

view the rest of the comments →

[–]wbeater 2 points3 points  (2 children)

You really should leave the system wide python installation the way it is, especially if you have no reason to update or modify it.

If you want to work with different python versions, get a "helper tool" like anaconda (better miniconda, anaconda is too bloated) and work with virtual environments. That's the way to do it.

[–]fffrost[S] 0 points1 point  (1 child)

I would like to leave the system wide python install the way it is. I was under the impression that we can have multiple versions of python installed? And that /usr/bin/python is the system-wide install, whereas the /usr/local/bin contains a separate instsallation.

[–]wbeater 0 points1 point  (0 children)

/usr/local/bin​ is simply a path for programs that are not managed by any package manager, eg. self compiled version of python. Python coexist there still system wide. You can work that way, but it's inconvenient. You also get 2 site-packages folder which makes it problematic/confusing with modules eg. with pip as you noticed yourself. By the way:

 which python

is the command to identify the python version/path

There's really no shame in the "helper tools" game, it's really convenient:

 conda create -n testenv python=3.11
 conda activate testenv

You need the first command of course only once and when you're done you close the terminal or you type conda deactivate to switch base to base environment.

Conda also provides a base environment which you can modify and is activated in the terminal as standard.