参考1
参考2
- 准备
apt-get install build-essential checkinstall
apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
- 下载
wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tgz
tar xzf Python-3.4.0.tgz
- 安装
将python3.4.0移动至/usr/bin/
cp python3.4 /usr/bin/
./configure --enable-shared
make
make install
- 更新一下替代列表,将 python2.7 和 python3.4 放入其中
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2
- 确认
查看python版本
python -V
- 错误
![报错](https://i-blog.csdnimg.cn/blog_migrate/3edb89914fb0fc8a402ebafb5f97a3b2.png)
apt-get install libssl-dev
apt-get install openssl