ubuntu18.04インストールpython3.7

ステートメント

1. ubuntu18.04システムには、python2.7およびpython3.6が付属しています。
2.ubuntuに付属のPythonバージョンをアンインストールしないでください。
3. pythonの異なるバージョンがubuntuの下で共存でき、python3.7を直接インストールできます。

インストール

1.Python3.7のインストール

sudo apt install python3.7

2.python3をpython3.7にポイントします

cd /usr/bin
sudo rm /usr/bin/python3
sudo ln -s python3.7 python3

3.pipのインストール

エラーが報告された場合
(解決策:ソースを追加(元のベースで):
deb http://cn.archive.ubuntu.com/ubuntu bionic main multiverse limited universe deb http://cn.archive.ubuntu.com/ubuntu bionic-アップデートメインマルチバース制限宇宙のdeb http://cn.archive.ubuntu.com/ubuntuバイオニック・セキュリティのメインマルチバース制限宇宙のdeb http://cn.archive.ubuntu.com/ubuntuバイオニック・提案メインマルチバース制限宇宙を
インストールdistutils、エラーの問題を解決します:sudo apt-get install python3-distutils install
again:sudo python3 get-pip.py

おすすめ

転載: blog.csdn.net/u013947963/article/details/96141247