第一步:
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
强制安装报错:
E: Unable to locate package python3.6-dev E: Couldn't find any package by glob 'python3.6-dev' E: Couldn't find any package by regex 'python3.6-dev'
解决办法:安装python3.6
方法1
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update sudo apt-get install python3.6
方法2
sudo add-apt-repository ppa:jonathonf/python-3.6 sudo apt-get update sudo apt-get install python3.6
使用pip -V查询,发现pip还是python3.5的pip,如何指向python3.6呢,首先是删除pip
apt-get remove python3-pip apt-get autoremove 然后是安装pip apt-get install python3-pip 发现pip还是指向 python3.5的,这个时候再用python3.6指定升级一下pip: python3.6 -m pip install --upgrade pip 然后再输入pip -V命令查询pip版本
原文:https://www.jianshu.com/p/1faac26639d0;https://blog.csdn.net/qq_42693848/article/details/88900553