ERRORS WITH UBUNTU
Install Pycharm
sudo apt install git
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掉即可
更多详细请参考这里。
Install python3
Solution
先查看系统中现有的python及其版本
我们发现系统中是没有python3.6的,现在我们来安装python3.6
- 配置软件仓库,因为python 3.6 新版没有发布到ubuntu的正式仓库中,咱们通过第3方仓库来做。在命令行中输入:
sudo add-apt-repository ppa:jonathonf/python-3.6
- 检查系统软件包并安装 python 3.6
sudo apt-get update
sudo apt-get install python3.6
此时再查看python3.6 版本
我们发现,python3.6 是已经有了,但是在查看python3时,默认选择的是python3.5.2
切换默认python版本
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 了。
Terminal中复制粘贴快捷键的使用
复制:command+shift+C
粘贴:command+shift+V
Install PIP
sudo apt-get install python-setuptools python-dev build-essential