Raspberry Pi 4 with Debian GNU/Linux 11 (bullseye)

本来这个时候应该上Ubuntu 22.04 LTS的。但是感觉Ubuntu 的Raspberry Pi的版本不是太稳定,反正我的dpkg系统坏了一次。所以这次还是用老一点的Raspberry Pi OS,也就是Debian 11。现在Debian也提供arm64,也就是aarch64的二进制包之后,好像Raspberry Pi的官方系统已经和Debian完全兼容了——也许就是直接拿Debian的包来用。

source.list直接用了Debian的源,但是update和install的操作都没任何问题。

$ cat /etc/apt/sources.list

deb http://mirrors.nju.edu.cn/debian bullseye main contrib non-free
#deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://mirrors.nju.edu.cn/debian bullseye-updates main contrib non-free
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://mirrors.nju.edu.cn/debian bullseye main contrib non-free
#deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
#deb-src http://mirrors.nju.edu.cn/debian bullseye-updates main contrib non-free
$ cat /etc/apt/sources.list.d/raspi.list

deb http://mirror.nju.edu.cn/raspberrypi/debian bullseye main
#deb http://archive.raspberrypi.org/debian/ bullseye main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ bullseye main

应该说arm64/aarch64的生态是越来越完善了,很多看起来比较遥远的第三方包都有预编译的二进制包。

anaconda 的arm64版本总是出现“段错误”。但是用系统自带的Python 3.9.2 + pip3 居然可以安装Tensorflow 和 Pytorch。注意它们的名字有点变化。

tensorflow-aarch64 · PyPITensorFlow is an open source machine learning framework for everyone.https://pypi.org/project/tensorflow-aarch64/ torch · PyPITensors and Dynamic neural networks in Python with strong GPU accelerationhttps://pypi.org/project/torch/

$ sudo apt install python3-pip
$ pip3 install pip -U
$ pip3 config set global.index-url https://mirror.nju.edu.cn/pypi/web/simple #我的网络连接南大的镜像源最快
$ pip3 install tensorflow-aarch64
$ pip3 install torch

R的版本略低

$ sudo apt install r-base r-base-dev
$ R
R version 4.0.4 (2021-02-15) -- "Lost Library Book"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>

Julia可以用官方的aarch64版本。

$ wget https://julialang-s3.julialang.org/bin/linux/aarch64/1.6/julia-1.6.7-linux-aarch64.tar.gz
$ tar zxf julia-1.6.7-linux-aarch64.tar.gz
$ mkdir ~/local
$ mv julia-1.6.7 ~/local/
$ export PATH=~/local/julian-1.6.7/bin:$PATH
$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.7 (2022-07-19)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia>

R(irkernel)和Julia(IJulia)都可以和Python共用Jupyter。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值