centos python2.x环境下正确安装python3并且配置pip3

版权声明:本文为博主原创文章,转载的时候记得注明出处哦~~~ https://blog.csdn.net/baidu_31657889/article/details/83350712

wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
tar -xf Python-3.6.1.tgz
cd Python-3.6.1
yum install gcc-c++
yum install pcre pcre-devel
yum install zlib zlib-devel
yum install openssl openssl–devel
yum install openssl -y
yum install openssl-devel -y
mkdir /usr/Python-3.6.1#<=====创建目录

./configure --prefix=/usr/Python-3.6.1 --with-ssl
make #<=====编译初始化
make install #<====安装
ln -s /usr/Python-3.6.1/bin/python3 /usr/bin/python3
python3 ------可以进入python环境下
ln -s /usr/Python-3.6.1/bin/pip3 /usr/bin/pip3
pip3 install xxx 可以安装对应依赖

地址:https://www.jianshu.com/p/758b592387d1

https://blog.csdn.net/jeryjeryjery/article/details/77880227

https://blog.csdn.net/yabingshi_tech/article/details/50439142

猜你喜欢

转载自blog.csdn.net/baidu_31657889/article/details/83350712