-
下载centos7 镜像:http://mirrors.ocf.berkeley.edu/centos-altarch/7.7.1908/isos/armhfp/
选择带 RaspberryPI-Minimal 字样的链接 -
使用Etcher将镜像烧录在TF卡上 (建议不小于16G)
-
将TF卡插在树莓派上,通电启动
-
登陆名:root,密码:centos
-
修改密码
$ passwd -
作为root用户,扩展filesystem空间
$ rootfs-expand -
更新及安装插件
$ sudo yum update
$ sudo yum install yum-utils
$ sudo yum groupinstall development
$ sudo yum install wget
$ sudo yum install gunzip (有时可省略) -
安装 python 3 (默认是 python 2.7.5)
$ wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
$ gunzip Python-3.7.1.tgz && tar -xvf Python-3.7.1.tar
$ cd Python-3.7.1
$ ./configure -prefix=/usr/local/
完成这一步后系统会有优化提示,可以按照提示开启优化,可以提高python程序10%以上的执行速度!但是默认需要你自己开启编译参数,因为它会耗费数倍的编译时间,因为要进行测试,决定编译优化结果。如果编译时间不重要 – 它毕竟只编
Centos7 虚拟机 & 树莓派 安装指南(含 Python3 & Pip3 安装)
最新推荐文章于 2022-07-21 11:35:27 发布