centos python2.x環境下正確安裝python3並且配置pip3

xiaoming3526發表於2018-10-24

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

相關文章