Q
Q
Quiab2019-12-08 20:29:51
linux
Quiab, 2019-12-08 20:29:51

How to replace python3 path in ubuntu?

Hello. A question. I decided to roll myself Python 3.8. I installed it, I'm happy with the new operator, but two problems appeared:
1. python 3.8 is launched when called in the python38 terminal, when python3 is called, python 3.6 is launched
2. I work in VSCode, and python 3.8 is not visible below, where you can select the interpreter, so it underlines the code is red and I can't run directly in VScode, only through the terminal (because usr/bin/python3.6 is selected and python3.8 is not displayed there)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dr. Bacon, 2019-12-08
@bacon

No need to touch anything in system python. The correct solution is to create your own virtual environment for each project, with the required python version.

V
Vadim Shatalov, 2019-12-08
@netpastor

https://github.com/pyenv/pyenv

D
Dimonchik, 2019-12-08
@dimonchik2013

calling python3 starts python 3.6

it's a symlink, you can reassign it to 3.8, but don't do that

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question