欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Debian 9 安装 Python3.6

程序员文章站 2022-03-24 16:06:08
...

Debian 9 安装 Python3.6

正文

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus
sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev
sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev
sudo apt-get install libssl-dev openssl
sudo apt-get install libffi-dev

然后下载

wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz

一般会很慢, 所以在本地下载完然后 scp 过去

然后

tar -zxvf Python-3.7.4.tgz
cd Python-3.7.4
sudo mkdir /usr/local/python3
sudo ./configure --prefix=/usr/local/python3
sudo make && make install
相关标签: python3 python