apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev
libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev
liblzma-dev libffi-dev libc6-dev
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
cd /usr/local
tar -zxvf Python-3.6.2.tgz
cd Python-3.6.2
./configure
make
make install
ln -s /usr/local/bin/python3.6 /usr/bin/python3
ln -s /usr/local/bin/pip3 /usr/bin/pip3
pip3 install virtualenv
virtualenv -p /usr/local/bin/python3.6 --no-site-packages venv
source my_project/bin/activate
原文地址:https://www.cnblogs.com/tianboblog/p/11717210.html
时间: 2024-10-10 15:39:09