install python3 env in centos7

1. install python3 env in centos7

echo "install python3 env in centos7"

yum install wget
yum install gcc gcc-c++ make openssl-devel -y

wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz -O /usr/local/python3.tar.xz
mkdir /usr/local/python3
tar -xvf /usr/local/python3.tar.xz -C /usr/local/python3
cd /usr/local/python3/Python-3.6.5
./configure --prefix=/usr/local/python3
make 
make install

rm /usr/local/python3.tar.xz -rf

ln -s /usr/local/python3/bin/python3 /usr/bin/python3
yum install epel-release
yum install python-pip -y

pip install virtualenv

mkdir /byb
virtualenv --no-site-packages -p /usr/bin/python3  /byb
source /byb/bin/activate
pip install scrapy
pip install requests
pip install pymongo
pip install sqlalchemy
pip install selenium

 

posted @ 2018-04-09 17:15  yugengde  阅读(175)  评论(0编辑  收藏  举报