Skip to content

Commit

Permalink
py
Browse files Browse the repository at this point in the history
  • Loading branch information
opcache committed Oct 24, 2019
1 parent 780f007 commit 361f873
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions python/install.py36.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
yum install epel-release -y
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum install python36 python36u-pip -y
python3.6 -m pip install --upgrade pip

mkdir -p /root/.pip/

cat > /root/.pip/pip.conf <<EOF
[global]
trusted-host=mirrors.aliyun.com
index-url=http://mirrors.aliyun.com/pypi/simple/
EOF

python -V
20 changes: 20 additions & 0 deletions python/install.py37.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

yum install -y gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

yum install -y libffi-devel

cd /opt/
##wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
tar -xvJf Python-3.7.0.tar.xz

mkdir -p /usr/local/python3
cd Python-3.7.4
./configure --prefix=/usr/local/python3
make && make install

ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3

python3 -V
pip3 -V

0 comments on commit 361f873

Please sign in to comment.