按照本文升级到3.6,但pip无法运行了,问题没有解决
1.添加python3.6安装包,并且安装
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
2.修改系统默认python版本为3.6
cd /user/bin
rm python
ln -s python3.6m python
重新安装pip成功
重新安装pip,命令格式:
python get-pip.py
参考:https://yq.aliyun.com/ziliao/261435
[email protected]:~# pyhon get-pip.py
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting pip
Downloading http://mirrors.aliyun.com/pypi/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 62.4MB/s
Collecting setuptools
Downloading http://mirrors.aliyun.com/pypi/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl (569kB)
100% |████████████████████████████████| 573kB 60.6MB/s
Installing collected packages: pip, setuptools
Successfully installed pip-18.1 setuptools-40.4.3
[email protected]:~# pip
---------------------
作者:flygqin
来源:CSDN
原文:https://blog.csdn.net/Qin605/article/details/77763541?utm_source=copy
版权声明:本文为博主原创文章,转载请附上博文链接!
https://blog.csdn.net/Qin605/article/details/77763541
另一问题的出现解决方案
更换python版本后出现 No module named "apt_pkg"
$ sudo apt-get remove --purge python-apt$ sudo apt-get install python-apt -f$ sudo find / -name "apt_pkg.cpython-35m-x86_64-linux-gnu.so"$ cd /usr/lib/python3/dist-packages/$ sudo cp apt_pkg.cpython-35m-x86_64-linux-gnu.so apt_pkg.cpython-36m-x86_64-linux-gnu.so
---------------------
作者:waketzheng
来源:CSDN
原文:https://blog.csdn.net/jaket5219999/article/details/78464310?utm_source=copy
版权声明:本文为博主原创文章,转载请附上博文链接!
原文地址:https://www.cnblogs.com/david2018098/p/9780361.html