CentOS 7升级、安装Python3.5.2

1、安装可能使用的依赖

yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
yum -y install gcc automake autoconf libtool make
yum install gcc gcc-c++
yum  -y install readline-devel
yum groupinstall 'Development Tools'

2、安装Python3.5.2

wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
tar -zxvf Python-3.5.2.tgz
cd Python-3.5.2
mkdir /usr/local/python3.5.2
./configure --prefix=/usr/local/python3.5.2
make && make install
mv /usr/bin/python /usr/bin/python2.7
ln -s /usr/local/python3.5.2/bin/python3.5 /usr/bin/python

如果mv /usr/bin/python /usr/bin/python2.7出现文件相同的提示,执行

rm -rf /usr/bin/python

然后

ln -s /usr/local/python3.5.2/bin/python3.5 /usr/bin/python

3、

vi /usr/bin/yum

将第一行指定的python版本改为python2.7(#!/usr/bin/python 改为 #!/usr/bin/python2.7)

vi /usr/libexec/urlgrabber-ext-down

将第一行指定的python版本改为python2.7(#!/usr/bin/python 改为 #!/usr/bin/python2.7)

以上即可成功安装Python3.5.2。

4、安装go
https://who.edu.pl/10693.html

5、安装sanic
python -m pip install sanic

python -m pip install aiocache
python -m pip install sanic_session
python -m pip install jinja2
python -m pip install motor
python -m pip install async_timeout
python -m pip install arrow
python -m pip install vloop
python -m pip install
python -m pip install
python -m pip install

python server.py

6、安装Selenium
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install -U selenium

赞 (0)