Recommended Way to Install Python3.8 on a VM?

2 respuestas [Último envío]
DoubleDual63
Desconectado/a
se unió: 12/16/2019

Hello all,

I'm not a very experienced user, and I had been trying to install Python 3.8 this afternoon, a process which I partially succeeded in after much frustration. It was definitely not a smooth path, so I feel like maybe I am doing something wrong and that theres a better way.

So this is what I did, and the problems I faced:

1. Followed a guide to download Python 3.8 from source and compile it manually.
There was no zlib library, had to install that.
Permission denied after configuring the Python code and calling Make on it, had to use sudo make

2. Tried to download a package with pip
There is no pip, and python-pip had no "installation candidate"
Looked online to see that its because sudo doesn't know they exist, first because the sources list file is not populated.
Copied down their ubuntu package source urls. At this point I am slightly concerned that I am using proprietary software.
Called sudo apt-update and was able to download pip and pip3 and python-pip

3. Tried to download that package again
pip uses Python2.7 and downloads to that folder, but pip3 downloads to 3.5. I want to download to 3.8, have not figured out how to configure pip3.
It cannot find Python.h
I found Python.h and added the folder to path.
Succeeded in downloading the package

4. Tried to run python3
It's in 3.5, cannot figure out how to make python3 point to 3.8
Also just for giggles, I tried to download psutil to see my CPU's temperature; It's not supported on trisquil so I am trying again on Ubuntu Mate

Is there some smoother path I could have followed or any mistakes I've made?

chaosmonk

I am a member!

I am a translator!

Desconectado/a
se unió: 07/07/2017

> I'm not a very experienced user, and I had been trying to install Python
> 3.8 this afternoon, a process which I partially succeeded in after much
> frustration.

> There is no pip, and python-pip had no "installation candidate"

pip searches and installs software from the PyPi repository, which
contains proprietary software. This is why Trisquel does not package
pip.

> Is there some smoother path I could have followed or any mistakes I've
> made?

The easiest way to install newer versions of Python is to use the
deadsnakes PPA.

$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt install python3.8

thomzane
Desconectado/a
se unió: 02/28/2019

I use pyenv to install multiple versions of python.

Git: https://github.com/pyenv/pyenv

Make sure you read the common build problems page:
https://github.com/pyenv/pyenv/wiki/Common-build-problems

Best,
Michael
What is GNU? Check out https://www.gnu.org/
GPG Key: 4337 2794 C8AD D5CA 8FCF FA6C D037 59DA B600 E3C0