Tuesday, May 7, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 768  / 2 Years ago, wed, august 24, 2022, 9:57:56

I'm on Ubuntu Mate 20.04. I'd like to install latest Python 3.8 on my system globally but I've noticed that it's the same Python install that is managed by the OS and therefore I'd like not to tweak it. For various reasons I need to work with exactly 3.8. I was thinking about installing it locally (e.g. on $HOME/.local) or even create a venv and sourcing the activation on every prompt but it seems to be just more confusing. Is there a safer way to achieve this?


This is not really the answer I was looking for. I'm talking about installing the same python version used by the system.


More From » software-installation

 Answers
5

'global' is a broad term.
The system-wide installation that comes pre-packaged with ubuntu is located in the /usr/bin/ directory.


If you want to install the latest python version, one of the best ways is to install it from the source (with sudo). This way, it will be installed 'globally' but at the /usr/local/bin directory.


Now, you will have two versions of the python interpreter - it's possible to have both of them as python3.8.


However, they remain distinct. One of them can be mapped as the default system-wide interpreter by using update-alternatives.


[#2448] Wednesday, August 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
emuralm

Total Points: 290
Total Questions: 111
Total Answers: 117

Location: China
Member since Thu, Sep 1, 2022
2 Years ago
;