Docker内安装Python

apt-get update
apt-get upgrade
apt install build-essential -y
apt install libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev zlib1g-dev libsqlite3-dev -y
apt install wget openssl curl
wget http://ftp.int0030.xyz/python/3.9.0/Python-3.9.0.tgz
tar -xvf Python-3.9.0.tgz
cd Python-3.9.0
./configure --enable-loadable-sqlite-extensions
make
make install
apt-get clean
rm -rf /var/lib/apt/lists/*
ln -s /usr/local/bin/pip3 /usr/bin/pip
ln -s /usr/local/bin/python3 /usr/bin/python
0 I like it
0 I don't like it

Leave a Reply

Your email address will not be published. Required fields are marked *