E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Solution:
ps -A | grep apt
查看正在运行的进程
sudo kill 3694
将其kill掉即可
更多详细请参考这里。
Solution
先查看系统中现有的python及其版本
我们发现系统中是没有python3.6的,现在我们来安装python3.6
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update sudo apt-get install python3.6
此时再查看python3.6 版本
我们发现,python3.6 是已经有了,但是在查看python3时,默认选择的是python3.5.2
Solution
在terminal下输入一下两条命令
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
再输入
sudo update-alternatives --config python3
可以看到这条指令更换了默认的python版本,我们再查看python3 默认版本的时候,显示的就是python3.6 了。
复制:command+shift+C
粘贴:command+shift+V
sudo apt-get install python-setuptools python-dev build-essential