树莓派3b+编译安装Python3.7.0

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

一、更新树莓派系统

sudo apt-get update
sudo apt-get upgrade

二、安装python需要的依赖

sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev

 

三、下载Python的源代码并解压 

cd mydownload
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar zxvf Python-3.7.0.tgz

四、配置、编译、安装 

sudo mkdir /usr/local/python370
sudo ./configure --prefix=/usr/local/python370
sudo make
sudo make install

五、创建符号链接

sudo ln -s /usr/local/python370/bin/python3 /usr/bin/python370
sudo ln -s /usr/local/python370/bin/python3 /usr/bin/python3.7.0
sudo ln -s /usr/local/python370/bin/pip3 /usr/bin/pip370
sudo ln -s /usr/local/python370/bin/pip3 /usr/bin/pip3.7.0

六、测试

python370 --version

 

转载于:https://my.oschina.net/mengyoufengyu/blog/2248239

你可能感兴趣的:(树莓派3b+编译安装Python3.7.0)