所以我使用这些说明更新了python:
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-devlibsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
然后
cd ~/Downloads
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar -xvf Python-3.5.0.tgz
cd Python-3.5.0
然后
./configure
sudo make install
python3.5
Python 3.5.0 (default,Oct 3 2015,03:16:42)
[GCC 4.8.4] on linux
Type "help","copyright","credits" or "license" for more information.
>>>
它工作,但当我关闭终端,并写道
python -v
它仍然是python 2.7并且仍然在执行使用v3标准库的代码时出错
如何让它像3.5一样工作?
最佳答案
原文链接:https://www.f2er.com/linux/440803.html