1. wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
2.
apt install gcc patch libffi-dev python-dev ncurses-dev tk-dev gdbm-dev db4-dev libpcap-dev xz-dev
3.
tar -xvf Python-3.6.2.tgz 
4.
cd  Python-3.6.2
5.
./configure --prefix=/opt/python/ 
6.
make & make install 
7.
vim /etc/profile 
8. 将 /opt/python/bin 添加到path的第一个位置

 

分类: Python

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。