树莓派安装python-3.8.5

2022-05-06  本文已影响0人  有怪兽变身奥特曼

1.安装依赖包

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev   
sudo apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm 
sudo apt-get install -y libncurses5-dev  libncursesw5-dev xz-utils tk-dev

2.下载python

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

3.解压

sudo tar -zxvf Python-3.8.5.tgz

4.进入目录

cd Python-3.8.5

5.安装python

sudo ./configure --prefix=/usr/local/python3 && make && make install

6.创建软连接

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

7.查看版本

python3 -V
pip3 -V
上一篇 下一篇

猜你喜欢

热点阅读