捕手 曲淡歌
曲淡歌
曲淡歌@admin

administrator

已封存 723 时光


注册时间: 2024-04-22 11:27:36

曲淡歌
曲淡歌@admin

2021 年 7 月 11 日

这是一条来自手机的动态,之后可以考虑使用网页转app

2021 年 7 月 11 日 138 1
  • 曲淡歌

    2021 年 7 月 11 日

    网页转app用一个叫“fusion app”的软件

回复

曲淡歌
曲淡歌@admin

2021 年 7 月 11 日

2021-07-11,我开始使用wordpress配合一个花费了我¥249的主题,搭建了一个属于我自己的微博。本来考虑到之前已经用typecho写了接近500条日常,想购买油老师开发的那款¥88的仿twitter主题,但是他表示主题已经停售了。最后几经周折,选择了这款简约但是实用的主题,而且看作者的更新日历,这个主题已经从2013年更新到2021年了,作者的人品还是很坚挺的。
不过一开始其实我是不想用wordpress的,因为这个框架确实显得有点老而且过时了。如果是早几年的我,我可能更倾向于使用成熟的、有着广泛参考资料的系统,但是使用mysql这种充满了古旧气息的数据库,总让我觉得这个决定在未来会给我带来困扰…但是现在也没有更好的选择了。
其实我个人是更倾向于使用思源笔记+oceanpress组合。可惜这套方案的部署麻烦,开发进度也缓慢。

时光捕手主题文档 https://doc.dukeyin.com/keepmins/zh

如何把typecho的文章转换到wordpress中 https://boke112.com/post/6482.html/mip

#[17] #[7]
2021 年 7 月 11 日 181
曲淡歌
曲淡歌@admin

2021 年 4 月 5 日

动画生成工具manim的安装笔记 

参考资料

3分钟安装好Manim教学动画制作包|Windows

官方github

国人修改版-中文友好但是更新落后

安装思路

使用新版windows提供的linux系统安装

之前都是想直接安装,发现总是配置出错,现在win10也兼容了linux了,何不如在win10下安装Linux之后再使用命令行安装呢?

在win商店搜索ubuntu并下载

image.png

ps:在大陆使用win商店不能挂梯子,否则会直接无法连接。如果下载慢的话,搜索一下如何开启p2p下载的功能

报错 WslRegisterDistribution failed with error: 0x8007019e

解决办法:
1.win+x,选择Windows PowerShell(管理员)
2.输入:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
3.回车,输入Y,重启!
4.重新打开已经安装的子系统,等几分钟,输入账户和密码
————————————————
版权声明:本文为CSDN博主「Vintage TANG」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_33033367/article/details/82820983

设置ubuntu账户

id:quqi

密码:qaq

开始安装(失败)

检查python环境

输入python3检查有无py,然后输入quit ()退出

安装pip

sudo apt-get install python3-pip

提示:

quqi@DESKTOP-TE57I1A:~$ sudo apt-get install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3-pip' has no installation candidate

应该是apt没有更新,输入sudo apt-get update

然后输入pip3,如果提示正常则说明可用

让linux可以使用win的代理

Windows 10里的WSL Ubuntu 怎么使用Windows系统的 SS 代理?

pip3 install genpac

sudo nano /etc/profile在文件末尾加入

export http_proxy=http://127.0.0.1:7890 
export https_proxy=http://127.0.0.1:7890 
export ftp_proxy=http://127.0.0.1:7890

使配置生效source /etc/profile

安装相关支持

sudo apt-get install libcairo2-dev

sudo apt install ffmpeg

sudo apt-get install sox

sudo apt install texlive-latex-extra或者(前者为简单版)sudo apt install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science

pip3 install manimlib

到此为止安装后总是各种毛病,于是卸载重装ubuntu

把ubuntu安装到其他盘

下载安装包

解压到自定义位置,重命名为.zip文件,点击Ubuntu.exe开始安装

报错

WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 ?????

更新系统后还是无法解决,放弃

第二种安装方式:git

使用git clone

git clone https://github.com/3b1b/manim

在win下安装

参考资料

Manim安装教程

Scoop官网:https://scoop.sh/
Conda清华源:https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
Scoop软件源目录:https://rasa.github.io/scoop-directory/by-score
manim官网:https://github.com/3b1b/manim

直接安装

打开powershell

安装scope

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb get.scoop.sh | iex

安装aria2

scoop install aria2

安装git

scoop install git

拓展源

scoop bucket add extras

安装ffmpeg

scoop search ffmpeg

查询到多个,选择一个安装

scoop install ffmpeg-nightly

安装LaTeX

scoop install LaTeX

使用anaconda安装(成功)#使用anaconda安装manim

成功安装但是无法支持中文

步骤概述:安装anaconda-按照github说明安装依赖-git clone/下载源码并放到本地-激活conda环境-安装requriments.txt-使用manimgl命令生成动画

  • 中间有一个报错

     No module named manim.__main__; 'manim' is a package and cannot be directly executed
    • 解决参考
    • python -m pip install --upgrade manim

      • 2021-04-02备注:pip的版本可能落后了,这样操作可能会导致奇怪的错误
  • 易错点:之前的教程很多都还是python -m manim example_scenes.py SquareToCircle -pl
    而现在最新版本已经是manimgl example_scenes.py OpeningManimExample

所以也要学会因地制宜、与时俱进,不要总是套过去的教程

再次尝试安装 2021-04-02 #2021-04-02-Manim

要求:这次不要使用pip,全程使用git

  • 创建新的conda环境

    1. conda create -n manim-kg python=3.8.5对应着manim-kindergarten
    2. 激活环境 conda activate manim-kg
    3. 发现可能之前安装的miktex不全,所以先卸载再重装

      1. 卸载:用管理员打开powershell,输入scoop uninstall latex
      2. 安装:

        1. 官网下载地址,选择all download,然后选择net install,根据电脑选择32或者64bit
        2. 选择download miktex,另外也可以在connetion settings里面设置代理开启代理的ip端口7890选择download miktex
        3. 下一步选择complete miktex,一路下载安装
    4. 然后下载修改版的manim,解压到manim-kg中并重命名为manim
    5. 然后pip install -r requirements.txt
    6. 使用pip list检查

      Package Version
      ————- ——————-
      certifi 2020.12.5
      colour 0.1.5
      numpy 1.20.2
      opencv-python 4.5.1.48
      Pillow 8.2.0
      pip 21.0.1
      progressbar 2.5
      pycairo 1.20.0
      pydub 0.25.1
      Pygments 2.8.1
      pyreadline 2.1
      scipy 1.6.2
      setuptools 52.0.0.post20210125
      tqdm 4.59.0
      wheel 0.36.2
      wincertstore 0.2

    7. 安装完成,尝试生成范例

      使用docker安装(成功)

      jasonkwan/manim

      b站相关视频

      相关的博客

      安装命令:docker run -it --rm -v /host/scene/dir:/scenes jasonkwan/manim:latest

      具体为:docker run -it --rm -v e:\docker:/scenes jasonkwan/manim:latest

      然后切换到py脚本目录cd /scenes/manim

      然后运行示例

  1. example.py SquareToCircle -p -ql

最后在目录:`E:\docker\manim\videos\example\480p15\partial_movie_files\Demo`下可以找到生成的视频文件!

对命令的解释:

![manim-illustration](https://raw.githubusercontent.com/ManimCommunity/manim/master/docs/source/_static/command.png)

安装完成后确实可以输出我之前做的那个例子,但是在官网找的其他例子又有问题。(manim这配置真的是麻烦到家了)

## 在树莓派里安装

Using username “pi”.
pi@192.168.1.61’s password:
Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Mar 12 23:49:10 2021

SSH is enabled and the default password for the ‘pi’ user has not been changed.
This is a security risk – please login as the ‘pi’ user and type ‘passwd’ to set a new password.

pi@raspberrypi:~ $ ping
Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]

        [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
        [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
        [-w deadline] [-W timeout] [hop1 ...] destination

Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]

         [-l preload] [-m mark] [-M pmtudisc_option]
         [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]
         [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]
         [-W timeout] destination

pi@raspberrypi:~ $ ping baidu.com
PING baidu.com (220.181.38.148) 56(84) bytes of data.
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=1 ttl=49 time=3.47 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=2 ttl=49 time=3.28 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=3 ttl=49 time=3.43 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=4 ttl=49 time=5.24 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=5 ttl=49 time=3.32 ms
^C
— baidu.com ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 11ms
rtt min/avg/max/mdev = 3.275/3.747/5.241/0.752 ms
pi@raspberrypi:~ $ ping github.com
PING github.com (52.74.223.119) 56(84) bytes of data.
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=1 ttl=35 time=181 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=2 ttl=35 time=201 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=3 ttl=35 time=183 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=4 ttl=35 time=189 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=5 ttl=35 time=206 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223. 119): icmp_seq=6 ttl=35 time=203 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=7 ttl=35 time=182 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=8 ttl=35 time=200 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=9 ttl=35 time=180 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=10 ttl=35 time=16 7 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=11 ttl=35 time=13 2 ms
64 bytes from ec2-52-74-223-119.ap-southeast-1.compute.amazonaws.com (52.74.223.119): icmp_seq=12 ttl=35 time=18 8 ms
^C
— github.com ping statistics —
12 packets transmitted, 12 received, 0% packet loss, time 27ms
rtt min/avg/max/mdev = 131.733/184.452/205.817/19.311 ms
pi@raspberrypi:~ $ pip

Usage:
pip [options]

Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.

General Options:
-h, –help Show help.
–isolated Run pip in an isolated mode, ignoring environment variables and user

                          configuration.

-v, –verbose Give more output. Option is additive, and can be used up to 3 times.
-V, –version Show version and exit.
-q, –quiet Give less output. Option is additive, and can be used up to 3 times

                          (corresponding to WARNING, ERROR, and CRITICAL logging levels).

–log Path to a verbose appending log.
–proxy Specify a proxy in the form [user:passwd@]proxy.server:port.
–retries Maximum number of retries each connection should attempt (default 5 times).
–timeout Set the socket timeout (default 15 seconds).
–exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,

                          (a)bort).

–trusted-host Mark this host as trusted, even though it does not have valid or any HTTPS.
–cert Path to alternate CA bundle.
–client-cert Path to SSL client certificate, a single file containing the private key and the

                          certificate in PEM format.

–cache-dir Store the cache data in .
–no-cache-dir Disable the cache.
–disable-pip-version-check

                          Don't periodically check PyPI to determine whether a new version of pip is
                          available for download. Implied with --no-index.

–no-color Suppress colored output
pi@raspberrypi:~ $ sudo apt-get update
命中:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
命中:2 http://archive.raspberrypi.org/debian buster InRelease
正在读取软件包列表… 完成
pi@raspberrypi:~ $ pip3

Usage:
pip3 [options]

Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.

General Options:
-h, –help Show help.
–isolated Run pip in an isolated mode, ignoring environment variables and user

                          configuration.

-v, –verbose Give more output. Option is additive, and can be used up to 3 times.
-V, –version Show version and exit.
-q, –quiet Give less output. Option is additive, and can be used up to 3 times

                          (corresponding to WARNING, ERROR, and CRITICAL logging levels).

–log Path to a verbose appending log.
–proxy Specify a proxy in the form [user:passwd@]proxy.server:port.
–retries Maximum number of retries each connection should attempt (default 5 times).
–timeout Set the socket timeout (default 15 seconds).
–exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,

                          (a)bort).

–trusted-host Mark this host as trusted, even though it does not have valid or any HTTPS.
–cert Path to alternate CA bundle.
–client-cert Path to SSL client certificate, a single file containing the private key and the

                          certificate in PEM format.

–cache-dir Store the cache data in .
–no-cache-dir Disable the cache.
–disable-pip-version-check

                          Don't periodically check PyPI to determine whether a new version of pip is
                          available for download. Implied with --no-index.

–no-color Suppress colored output
pi@raspberrypi:~ $ sudo apt-get install libcairo2-dev
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会同时安装下列软件:
libblkid-dev libcairo-script-interpreter2 libffi-dev libfontconfig1-dev libglib2.0-dev libglib2.0-dev-bin
liblzo2-2 libmount-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-dev libselinux1-dev
libsepol1-dev libxcb-render0-dev libxcb-shm0-dev libxext-dev libxrender-dev uuid-dev x11proto-xext-dev
建议安装:
libcairo2-doc libglib2.0-doc libgdk-pixbuf2.0-bin | libgdk-pixbuf2.0-dev libxml2-utils libxext-doc
下列【新】软件包将被安装:
libblkid-dev libcairo-script-interpreter2 libcairo2-dev libffi-dev libfontconfig1-dev libglib2.0-dev
libglib2.0-dev-bin liblzo2-2 libmount-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-dev
libselinux1-dev libsepol1-dev libxcb-render0-dev libxcb-shm0-dev libxext-dev libxrender-dev uuid-dev
x11proto-xext-dev
升级了 0 个软件包,新安装了 22 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 6,451 kB 的归档。
解压缩后会消耗 21.5 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://archive.raspberrypi.org/debian buster/main armhf libcairo-script-interpreter2 armhf 1.16.0-4+rpt1 [150 kB]
获取:2 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf uuid-dev armhf 2.33.1-0.1 [92.4 kB]
获取:4 http://archive.raspberrypi.org/debian buster/main armhf libpixman-1-dev armhf 0.36.0-1+rpt1 [498 kB]
获取:6 http://archive.raspberrypi.org/debian buster/main armhf libcairo2-dev armhf 1.16.0-4+rpt1 [618 kB]
获取:5 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf liblzo2-2 armhf 2.10-0.1 [48.4 kB]
获取:7 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf libfontconfig1-dev armhf 2.13.1-2 [943 kB]
获取:9 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf x11proto-xext-dev all 2018.4-4 [3,128 B]
获取:3 http://mirrors.neusoft.edu.cn/raspbian/raspbian buster/main armhf libblkid-dev armhf 2.33.1-0.1 [210 kB]
获取:10 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libxext-dev armhf 2:1.3.3-1+b2 [102 kB]
获取:8 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libxrender-dev armhf 1:0.9.10-1 [37.7 kB]
获取:11 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libxcb-render0-dev armhf 1.13.1-2 [111 kB]
获取:12 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libxcb-shm0-dev armhf 1.13.1-2 [100 kB]
获取:14 http://mirrors.neusoft.edu.cn/raspbian/raspbian buster/main armhf libglib2.0-dev-bin armhf 2.58.3-2+deb1 0u2 [155 kB]
获取:15 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf libmount-dev armhf 2.33.1-0.1 [209 kB]
获取:17 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libpcre32-3 armhf 2:8.39-12 [227 kB]
获取:13 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libffi-dev armhf 3.2.1-9 [159 kB]
获取:16 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libpcre16-3 armhf 2:8.39-12 [234 kB ]
获取:19 http://mirrors.neusoft.edu.cn/raspbian/raspbian buster/main armhf libpcre3-dev armhf 2:8.39-12 [564 kB]
获取:18 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libpcrecpp0v5 armhf 2:8.39-12 [150 kB]
获取:20 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf libsepol1-dev armhf 2.8-1 [309 kB]
获取:21 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libselinux1-dev armhf 2.8-1+b1 [156 kB]
获取:22 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libglib2.0-dev armhf 2.58.3-2+deb10 u2 [1,372 kB]
已下载 6,451 kB,耗时 18秒 (350 kB/s)
正在选中未选择的软件包 uuid-dev:armhf。
(正在读取数据库 … 系统当前共安装有 163693 个文件和目录。)
准备解压 …/00-uuid-dev_2.33.1-0.1_armhf.deb …
正在解压 uuid-dev:armhf (2.33.1-0.1) …
正在选中未选择的软件包 libblkid-dev:armhf。
准备解压 …/01-libblkid-dev_2.33.1-0.1_armhf.deb …
正在解压 libblkid-dev:armhf (2.33.1-0.1) …
正在选中未选择的软件包 liblzo2-2:armhf。
准备解压 …/02-liblzo2-2_2.10-0.1_armhf.deb …
正在解压 liblzo2-2:armhf (2.10-0.1) …
正在选中未选择的软件包 libcairo-script-interpreter2:armhf。
准备解压 …/03-libcairo-script-interpreter2_1.16.0-4+rpt1_armhf.deb …
正在解压 libcairo-script-interpreter2:armhf (1.16.0-4+rpt1) …
正在选中未选择的软件包 libfontconfig1-dev:armhf。
准备解压 …/04-libfontconfig1-dev_2.13.1-2_armhf.deb …
正在解压 libfontconfig1-dev:armhf (2.13.1-2) …
正在选中未选择的软件包 libxrender-dev:armhf。
准备解压 …/05-libxrender-dev_1%3a0.9.10-1_armhf.deb …
正在解压 libxrender-dev:armhf (1:0.9.10-1) …
正在选中未选择的软件包 x11proto-xext-dev。
准备解压 …/06-x11proto-xext-dev_2018.4-4_all.deb …
正在解压 x11proto-xext-dev (2018.4-4) …
正在选中未选择的软件包 libxext-dev:armhf。
准备解压 …/07-libxext-dev_2%3a1.3.3-1+b2_armhf.deb …
正在解压 libxext-dev:armhf (2:1.3.3-1+b2) …
正在选中未选择的软件包 libpixman-1-dev:armhf。
准备解压 …/08-libpixman-1-dev_0.36.0-1+rpt1_armhf.deb …
正在解压 libpixman-1-dev:armhf (0.36.0-1+rpt1) …
正在选中未选择的软件包 libxcb-render0-dev:armhf。
准备解压 …/09-libxcb-render0-dev_1.13.1-2_armhf.deb …
正在解压 libxcb-render0-dev:armhf (1.13.1-2) …
正在选中未选择的软件包 libxcb-shm0-dev:armhf。
准备解压 …/10-libxcb-shm0-dev_1.13.1-2_armhf.deb …
正在解压 libxcb-shm0-dev:armhf (1.13.1-2) …
正在选中未选择的软件包 libffi-dev:armhf。
准备解压 …/11-libffi-dev_3.2.1-9_armhf.deb …
正在解压 libffi-dev:armhf (3.2.1-9) …
正在选中未选择的软件包 libglib2.0-dev-bin。
准备解压 …/12-libglib2.0-dev-bin_2.58.3-2+deb10u2_armhf.deb …
正在解压 libglib2.0-dev-bin (2.58.3-2+deb10u2) …
正在选中未选择的软件包 libmount-dev:armhf。
准备解压 …/13-libmount-dev_2.33.1-0.1_armhf.deb …
正在解压 libmount-dev:armhf (2.33.1-0.1) …
正在选中未选择的软件包 libpcre16-3:armhf。
准备解压 …/14-libpcre16-3_2%3a8.39-12_armhf.deb …
正在解压 libpcre16-3:armhf (2:8.39-12) …
正在选中未选择的软件包 libpcre32-3:armhf。
准备解压 …/15-libpcre32-3_2%3a8.39-12_armhf.deb …
正在解压 libpcre32-3:armhf (2:8.39-12) …
正在选中未选择的软件包 libpcrecpp0v5:armhf。
准备解压 …/16-libpcrecpp0v5_2%3a8.39-12_armhf.deb …
正在解压 libpcrecpp0v5:armhf (2:8.39-12) …
正在选中未选择的软件包 libpcre3-dev:armhf。
准备解压 …/17-libpcre3-dev_2%3a8.39-12_armhf.deb …
正在解压 libpcre3-dev:armhf (2:8.39-12) …
正在选中未选择的软件包 libsepol1-dev:armhf。
准备解压 …/18-libsepol1-dev_2.8-1_armhf.deb …
正在解压 libsepol1-dev:armhf (2.8-1) …
正在选中未选择的软件包 libselinux1-dev:armhf。
准备解压 …/19-libselinux1-dev_2.8-1+b1_armhf.deb …
正在解压 libselinux1-dev:armhf (2.8-1+b1) …
正在选中未选择的软件包 libglib2.0-dev:armhf。
准备解压 …/20-libglib2.0-dev_2.58.3-2+deb10u2_armhf.deb …
正在解压 libglib2.0-dev:armhf (2.58.3-2+deb10u2) …
正在选中未选择的软件包 libcairo2-dev:armhf。
准备解压 …/21-libcairo2-dev_1.16.0-4+rpt1_armhf.deb …
正在解压 libcairo2-dev:armhf (1.16.0-4+rpt1) …
正在设置 libpcrecpp0v5:armhf (2:8.39-12) …
正在设置 libglib2.0-dev-bin (2.58.3-2+deb10u2) …
正在设置 libpixman-1-dev:armhf (0.36.0-1+rpt1) …
正在设置 libpcre16-3:armhf (2:8.39-12) …
正在设置 libsepol1-dev:armhf (2.8-1) …
正在设置 liblzo2-2:armhf (2.10-0.1) …
正在设置 libffi-dev:armhf (3.2.1-9) …
正在设置 libxcb-shm0-dev:armhf (1.13.1-2) …
正在设置 uuid-dev:armhf (2.33.1-0.1) …
正在设置 libpcre32-3:armhf (2:8.39-12) …
正在设置 libxcb-render0-dev:armhf (1.13.1-2) …
正在设置 x11proto-xext-dev (2018.4-4) …
正在设置 libxrender-dev:armhf (1:0.9.10-1) …
正在设置 libcairo-script-interpreter2:armhf (1.16.0-4+rpt1) …
正在设置 libblkid-dev:armhf (2.33.1-0.1) …
正在设置 libfontconfig1-dev:armhf (2.13.1-2) …
正在设置 libpcre3-dev:armhf (2:8.39-12) …
正在设置 libxext-dev:armhf (2:1.3.3-1+b2) …
正在设置 libmount-dev:armhf (2.33.1-0.1) …
正在设置 libselinux1-dev:armhf (2.8-1+b1) …
正在设置 libglib2.0-dev:armhf (2.58.3-2+deb10u2) …
正在处理用于 install-info (6.5.0.dfsg.1-4+b1) 的触发器 …
正在处理用于 libglib2.0-0:armhf (2.58.3-2+deb10u2) 的触发器 …
正在处理用于 libc-bin (2.28-10+rpi1) 的触发器 …
正在处理用于 man-db (2.8.5-2) 的触发器 …
正在设置 libcairo2-dev:armhf (1.16.0-4+rpt1) …
pi@raspberrypi:~ $ sudo apt install ffmpeg
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
ffmpeg 已经是最新版 (7:4.1.6-1~deb10u1+rpt1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
pi@raspberrypi:~ $ sudo apt-get install sox
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会同时安装下列软件:
libopencore-amrnb0 libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base libsox3
建议安装:
libsox-fmt-all
下列【新】软件包将被安装:
libopencore-amrnb0 libopencore-amrwb0 libsox-fmt-alsa libsox-fmt-base libsox3 sox
升级了 0 个软件包,新安装了 6 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 607 kB 的归档。
解压缩后会消耗 1,309 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:2 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libopencore-amrwb0 armhf 0.1.3-2.1 [42.0 kB]
获取:1 http://mirrors.nju.edu.cn/raspbian/raspbian buster/main armhf libopencore-amrnb0 armhf 0.1.3-2.1 [80.4 kB]
获取:3 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libsox3 armhf 14.4.2+git20190427-1 [226 kB]
获取:4 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libsox-fmt-alsa armhf 14.4.2+git20190427-1 [51.2 kB]
获取:5 http://mirrors.neusoft.edu.cn/raspbian/raspbian buster/main armhf libsox-fmt-base armhf 14.4.2+git20190427-1 [68.4 kB]
获取:6 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian buster/main armhf sox armhf 14.4.2+git20190427-1 [139 kB]
已下载 607 kB,耗时 4秒 (145 kB/s)
正在选中未选择的软件包 libopencore-amrnb0:armhf。
(正在读取数据库 … 系统当前共安装有 165166 个文件和目录。)
准备解压 …/0-libopencore-amrnb0_0.1.3-2.1_armhf.deb …
正在解压 libopencore-amrnb0:armhf (0.1.3-2.1) …
正在选中未选择的软件包 libopencore-amrwb0:armhf。
准备解压 …/1-libopencore-amrwb0_0.1.3-2.1_armhf.deb …
正在解压 libopencore-amrwb0:armhf (0.1.3-2.1) …
正在选中未选择的软件包 libsox3:armhf。
准备解压 …/2-libsox3_14.4.2+git20190427-1_armhf.deb …
正在解压 libsox3:armhf (14.4.2+git20190427-1) …
正在选中未选择的软件包 libsox-fmt-alsa:armhf。
准备解压 …/3-libsox-fmt-alsa_14.4.2+git20190427-1_armhf.deb …
正在解压 libsox-fmt-alsa:armhf (14.4.2+git20190427-1) …
正在选中未选择的软件包 libsox-fmt-base:armhf。
准备解压 …/4-libsox-fmt-base_14.4.2+git20190427-1_armhf.deb …
正在解压 libsox-fmt-base:armhf (14.4.2+git20190427-1) …
正在选中未选择的软件包 sox。
准备解压 …/5-sox_14.4.2+git20190427-1_armhf.deb …
正在解压 sox (14.4.2+git20190427-1) …
正在设置 libsox3:armhf (14.4.2+git20190427-1) …
正在设置 libopencore-amrwb0:armhf (0.1.3-2.1) …
正在设置 libsox-fmt-alsa:armhf (14.4.2+git20190427-1) …
正在设置 libopencore-amrnb0:armhf (0.1.3-2.1) …
正在设置 libsox-fmt-base:armhf (14.4.2+git20190427-1) …
正在设置 sox (14.4.2+git20190427-1) …
正在处理用于 libc-bin (2.28-10+rpi1) 的触发器 …
正在处理用于 man-db (2.8.5-2) 的触发器 …
正在处理用于 mime-support (3.62) 的触发器 …
pi@raspberrypi:~ $ pip install manimgl
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting manimgl
Downloading https://files.pythonhosted.org/packages/79/a2/5d3c21e5b51367af09a0159b0da76ca76b9ef6f51d1e6b5e4bb8e8779e6e/manimgl-1.0.0.tar.gz (21.2MB)

100% |████████████████████████████████| 21.2MB 16kB/s

Requirement already satisfied: Pillow in /usr/lib/python2.7/dist-packages (from manimgl) (5.4.1)
Collecting PyOpenGL (from manimgl)
Downloading https://files.pythonhosted.org/packages/7e/78/2bc24caecba024f7d128030451899531cd4c2a2a2bad342d5e5010089324/PyOpenGL-3.1.5-py2-none-any.whl (2.4MB)

100% |████████████████████████████████| 2.4MB 73kB/s

Requirement already satisfied: argparse in /usr/lib/python2.7 (from manimgl) (1.2.1)
Collecting colour (from manimgl)
Downloading https://files.pythonhosted.org/packages/74/46/e81907704ab203206769dee1385dc77e1407576ff8f50a0681d0a6b541be/colour-0.1.5-py2.py3-none-any.whl
Collecting ipython (from manimgl)
Downloading https://files.pythonhosted.org/packages/ce/2c/2849a2b37024a01a847c87d81825c0489eb22ffc6416cac009bf281ea838/ipython-5.10.0-py2-none-any.whl (760kB)

100% |████████████████████████████████| 768kB 140kB/s

Collecting manimpango=0.2.0 (from manimgl) (from versions: )
No matching distribution found for manimpango=0.2.0 (from manimgl)
Downloading https://www.piwheels.org/simple/manimpango/ManimPango-0.2.4-cp37-cp37m-linux_armv7l.whl (286kB)

100% |████████████████████████████████| 286kB 243kB/s

Collecting PyOpenGL (from manimgl)
Downloading https://files.pythonhosted.org/packages/47/9a/8d9364533ebcaa13621994a63dcc6a6051e27671ae5e1715dac4af18cac2/PyOpenGL-3.1.5-py3-none-any.whl (2.4MB)

100% |████████████████████████████████| 2.4MB 175kB/s

Collecting progressbar (from manimgl)
Downloading https://www.piwheels.org/simple/progressbar/progressbar-2.5-py3-none-any.whl
Collecting sympy (from manimgl)
Downloading https://files.pythonhosted.org/packages/ff/69/b16fc81b939d3efdd0b552f2e3e54f7fa1423d0c320cced2e69e675dde26/sympy-1.7.1-py3-none-any.whl (5.9MB)

100% |████████████████████████████████| 5.9MB 74kB/s

Collecting moderngl-window (from manimgl)
Downloading https://files.pythonhosted.org/packages/61/79/2178d46ee8f80bd1e895d3c7baf8618ff9add000a8c944a35f0252d7d53c/moderngl_window-2.3.0-py3-none-any.whl (126kB)

100% |████████████████████████████████| 133kB 1.2MB/s

Collecting validators (from manimgl)
Downloading https://files.pythonhosted.org/packages/db/2f/7fed3ee94ad665ad2c1de87f858f10a7785251ff75b4fd47987888d07ef1/validators-0.18.2-py3-none-any.whl
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from manimgl) (1.16.2)
Collecting tqdm (from manimgl)
Downloading https://files.pythonhosted.org/packages/f8/3e/2730d0effc282960dbff3cf91599ad0d8f3faedc8e75720fdf224b31ab24/tqdm-4.59.0-py2.py3-none-any.whl (74kB)

100% |████████████████████████████████| 81kB 1.8MB/s

Collecting scipy (from manimgl)
Downloading https://www.piwheels.org/simple/scipy/scipy-1.6.1-cp37-cp37m-linux_armv7l.whl (62.0MB)

100% |████████████████████████████████| 62.0MB 7.4kB/s

Collecting mapbox-earcut (from manimgl)
Downloading https://www.piwheels.org/simple/mapbox-earcut/mapbox_earcut-0.12.10-cp37-cp37m-linux_armv7l.whl (51kB)

100% |████████████████████████████████| 61kB 80kB/s

Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from manimgl) (5.4.1)
Collecting screeninfo (from manimgl)
Downloading https://www.piwheels.org/simple/screeninfo/screeninfo-0.6.7-py3-none-any.whl
Requirement already satisfied: matplotlib in /usr/lib/python3/dist-packages (from manimgl) (3.0.2)
Collecting colour (from manimgl)
Using cached https://files.pythonhosted.org/packages/74/46/e81907704ab203206769dee1385dc77e1407576ff8f50a0681d0a6b541be/colour-0.1.5-py2.py3-none-any.whl
Collecting argparse (from manimgl)
Downloading https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting pydub (from manimgl)
Downloading https://files.pythonhosted.org/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl
Requirement already satisfied: ipython in /usr/lib/python3/dist-packages (from manimgl) (5.8.0)
Collecting moderngl (from manimgl)
Downloading https://www.piwheels.org/simple/moderngl/moderngl-5.6.4-cp37-cp37m-linux_armv7l.whl (864kB)

100% |████████████████████████████████| 870kB 169kB/s

Collecting mpmath>=0.19 (from sympy->manimgl)
Downloading https://files.pythonhosted.org/packages/d4/cf/3965bddbb4f1a61c49aacae0e78fd1fe36b5dc36c797b31f30cf07dcbbb7/mpmath-1.2.1-py3-none-any.whl (532kB)

100% |████████████████████████████████| 542kB 698kB/s

Collecting pyglet=1.5.8 (from moderngl-window->manimgl)
Downloading https://files.pythonhosted.org/packages/81/5e/aef9e460989e4b832215d5fcee3ea9b0629e9bce8607284d9c1021b6a251/pyglet-1.5.15-py3-none-any.whl (1.1MB)

100% |████████████████████████████████| 1.1MB 367kB/s

Collecting pyrr=0.10.3 (from moderngl-window->manimgl)
Downloading https://files.pythonhosted.org/packages/80/d4/09bb74e93f9f677eadcf9ddb92681755f75e0f354a1b904f1913e32ca1b2/pyrr-0.10.3-py3-none-any.whl (46kB)

100% |████████████████████████████████| 51kB 2.1MB/s

Requirement already satisfied: decorator>=3.4.0 in /usr/lib/python3/dist-packages (from validators->manimgl) (4.3.0)
Requirement already satisfied: six>=1.4.0 in /usr/lib/python3/dist-packages (from validators->manimgl) (1.12.0)
Requirement already satisfied: pexpect in /usr/lib/python3/dist-packages (from ipython->manimgl) (4.6.0)
Collecting glcontext=2 (from moderngl->manimgl)
Downloading https://www.piwheels.org/simple/glcontext/glcontext-2.3.2-cp37-cp37m-linux_armv7l.whl (65kB)

100% |████████████████████████████████| 71kB 110kB/s

Collecting multipledispatch (from pyrr=0.10.3->moderngl-window->manimgl)
Downloading https://files.pythonhosted.org/packages/89/79/429ecef45fd5e4504f7474d4c3c3c4668c267be3370e4c2fd33e61506833/multipledispatch-0.6.0-py3-none-any.whl
Building wheels for collected packages: pyyaml
Running setup.py bdist_wheel for pyyaml … done
Stored in directory: /home/pi/.cache/pip/wheels/2a/d4/92/cf299bdf4162957ca8126b46e913e29f76a4f17ca762c45028
Successfully built pyyaml
scipy 1.6.1 has requirement numpy>=1.16.5, but you’ll have numpy 1.16.2 which is incompatible.
Installing collected packages: pyyaml, manimpango, PyOpenGL, progressbar, mpmath, sympy, glcontext, moderngl, pyglet, multipledispatch, pyrr, moderngl-window, validators, tqdm, scipy, mapbox-earcut, screeninfo, colour, argparse, pydub, manimgl
The script isympy is installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
The script tqdm is installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
The scripts manim-render and manimgl are installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
Successfully installed PyOpenGL-3.1.5 argparse-1.4.0 colour-0.1.5 glcontext-2.3.2 manimgl-1.0.0 manimpango-0.2.4 mapbox-earcut-0.12.10 moderngl-5.6.4 moderngl-window-2.3.0 mpmath-1.2.1 multipledispatch-0.6.0 progressbar-2.5 pydub-0.25.1 pyglet-1.5.15 pyrr-0.10.3 pyyaml-5.4.1 scipy-1.6.1 screeninfo-0.6.7 sympy-1.7.1 tqdm-4.59.0 validators-0.18.2


---

但是又提示另一个问题`scipy 1.6.1 has requirement numpy>=1.16.5, but you'll have numpy 1.16.2 which is incompatible.`

说明numpy版本过低,使用命令`pip3 install --user -U numpy`升级

---

此外还提示

The script isympy is installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
The script tqdm is installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.
The scripts manim-render and manimgl are installed in ‘/home/pi/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use –no-warn-script-location.


使用`echo 'export PATH=/home/pi/.local/bin:$PATH' >>~/.bashrc`

`source ~/.bashrc`

`pip3 uninstall manimgl`

`pip3 install manimgl`

---

报错

pi@raspberrypi:~ $ manimgl
Traceback (most recent call last):
File “/home/pi/.local/lib/python3.7/site-packages/numpy/core/__init__.py”, line 22, in

from . import multiarray

File “/home/pi/.local/lib/python3.7/site-packages/numpy/core/multiarray.py”, line 12, in

from . import overrides

File “/home/pi/.local/lib/python3.7/site-packages/numpy/core/overrides.py”, line 7, in

from numpy.core._multiarray_umath import (

ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/pi/.local/bin/manimgl”, line 6, in

from manimlib.__main__ import main

File “/home/pi/.local/lib/python3.7/site-packages/manimlib/__init__.py”, line 1, in

from manimlib.constants import *

File “/home/pi/.local/lib/python3.7/site-packages/manimlib/constants.py”, line 1, in

import numpy as np

File “/home/pi/.local/lib/python3.7/site-packages/numpy/__init__.py”, line 145, in

from . import core

File “/home/pi/.local/lib/python3.7/site-packages/numpy/core/__init__.py”, line 48, in

raise ImportError(msg)

ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.7 from “/usr/bin/python3”
  • The NumPy version is: “1.20.1”

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory


根据提示前往网址[https://numpy.org/devdocs/user/troubleshooting-importerror.html](https://numpy.org/devdocs/user/troubleshooting-importerror.html)

发现有针对树莓派的典型报错:

`libf77blas.so.3: cannot open shared object file: No such file or directory`

一看果然是这个问题

官方提供的解决方法是:`sudo apt-get install libatlas-base-dev`

---

按照上面的方法解决了numpy报错之后,另外一个问题依然存在

pi@raspberrypi:~ $ sudo apt-get install libatlas-base-dev
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会同时安装下列软件:
libatlas3-base
建议安装:
libatlas-doc liblapack-doc
下列【新】软件包将被安装:
libatlas-base-dev libatlas3-base
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 5,365 kB 的归档。
解压缩后会消耗 32.1 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://mirrors.bfsu.edu.cn/raspbian/raspbian buster/main armhf libatlas3-base armhf 3.10.3-8+rpi1 [2,399 kB]
获取:2 http://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian buster/main armhf libatlas-base-dev armhf 3.10.3-8+rpi1 [2,966 kB]
已下载 5,365 kB,耗时 4秒 (1,314 kB/s)
正在选中未选择的软件包 libatlas3-base:armhf。
(正在读取数据库 … 系统当前共安装有 165238 个文件和目录。)
准备解压 …/libatlas3-base_3.10.3-8+rpi1_armhf.deb …
正在解压 libatlas3-base:armhf (3.10.3-8+rpi1) …
正在选中未选择的软件包 libatlas-base-dev:armhf。
准备解压 …/libatlas-base-dev_3.10.3-8+rpi1_armhf.deb …
正在解压 libatlas-base-dev:armhf (3.10.3-8+rpi1) …
正在设置 libatlas3-base:armhf (3.10.3-8+rpi1) …
update-alternatives: 使用 /usr/lib/arm-linux-gnueabihf/atlas/libblas.so.3 来在自动模式中提供 /usr/lib/arm-linux-gnueabihf/libblas.so.3 (libblas.so.3-arm-linux-gnueabihf)
update-alternatives: 使用 /usr/lib/arm-linux-gnueabihf/atlas/liblapack.so.3 来在自动模式中提供 /usr/lib/arm-linux-gnueabihf/liblapack.so.3 (liblapack.so.3-arm-linux-gnueabihf)
正在设置 libatlas-base-dev:armhf (3.10.3-8+rpi1) …
update-alternatives: 使用 /usr/lib/arm-linux-gnueabihf/atlas/libblas.so 来在自动模式中提供 /usr/lib/arm-linux-gnueabihf/libblas.so (libblas.so-arm-linux-gnueabihf)
update-alternatives: 使用 /usr/lib/arm-linux-gnueabihf/atlas/liblapack.so 来在自动模式中提供 /usr/lib/arm-linux-gnueabihf/liblapack.so (liblapack.so-arm-linux-gnueabihf)
正在处理用于 libc-bin (2.28-10+rpi1) 的触发器 …
pi@raspberrypi:~ $ manimgl
Traceback (most recent call last):
File “/home/pi/.local/bin/manimgl”, line 6, in

from manimlib.__main__ import main

File “/home/pi/.local/lib/python3.7/site-packages/manimlib/__init__.py”, line 19, in

from manimlib.window import *

File “/home/pi/.local/lib/python3.7/site-packages/manimlib/window.py”, line 2, in

from moderngl_window.context.pyglet.window import Window as PygletWindow

File “/home/pi/.local/lib/python3.7/site-packages/moderngl_window/context/pyglet/__init__.py”, line 1, in

from .keys import Keys  # noqa

File “/home/pi/.local/lib/python3.7/site-packages/moderngl_window/context/pyglet/keys.py”, line 12, in

from pyglet.window import key

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/window/__init__.py”, line 1899, in

gl._create_shadow_window()

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/gl/__init__.py”, line 206, in _create_shadow_window

_shadow_window = Window(width=1, height=1, visible=False)

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/window/xlib/__init__.py”, line 173, in init

super(XlibWindow, self).__init__(*args, **kwargs)

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/window/__init__.py”, line 585, in init

display = pyglet.canvas.get_display()

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/canvas/__init__.py”, line 94, in get_display

return Display()

File “/home/pi/.local/lib/python3.7/site-packages/pyglet/canvas/xlib.py”, line 123, in init

raise NoSuchDisplayException('Cannot connect to "%s"' % name)

pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to “None”


---

暂时不管上述报错,直接git clone试试

`git clone https://github.com/3b1b/manim`

`cd manim`

`pip3 install -e .`

发现确实不行,之前环境配置有错

### 安装pi lite系统

怀疑是之前那个full版系统环境复杂,这次下载一个完全纯净的试试

`sudo apt-get update`

`sudo apt install python3-pip`

## 在mac系统里面安装

### 安装homebrew

[官网](https://brew.sh/index_zh-cn)

打开终端,输入`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`

然后安装到这一步卡住

==> Tapping homebrew/core
Cloning into ‘/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core’…


此时重启终端或者打断进程,然后切换到homebrew目录:

`cd /usr/local/Homebrew/Library/Taps/homebrew`

使用`ls`查看目录是否为空,如果有文件夹则使用`rm -r homebrew-core`删除东西

`git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git`

### 安装依赖

brew install ffmpeg mactex


### 安装manim

git clone https://github.com/3b1b/manim.git

cd manim


安装到这步发现没有pip,于是安装pip

curl https://bootstrap.pypa.io/get-pip.py | python3

pip3 install -e .


然后报错

hfy@HFYdeMac-mini ~ % pip3 install -e .
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
ERROR: File “setup.py” not found. Directory cannot be installed in editable mode: /Users/hfy


于是根据说明换用`python -m pip install -e .`

manimgl example_scenes.py OpeningManimExample


但是报错

hfy@HFYdeMac-mini manim % pip3 install -e .
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///Users/hfy/manim
Collecting argparse
Downloading argparse-1.4.0-py2.py3-none-any.whl (23 kB)
Collecting colour
Downloading colour-0.1.5-py2.py3-none-any.whl (23 kB)
Collecting numpy
Downloading numpy-1.20.1-cp38-cp38-macosx_10_9_x86_64.whl (16.0 MB)

 |████████████████████████████████| 16.0 MB 378 kB/s 

Collecting Pillow
Downloading Pillow-8.1.2-cp38-cp38-macosx_10_10_x86_64.whl (2.2 MB)

 |████████████████████████████████| 2.2 MB 423 kB/s 

Collecting scipy
Downloading scipy-1.6.1-cp38-cp38-macosx_10_9_x86_64.whl (30.8 MB)

 |████████████████████████████████| 30.8 MB 379 kB/s 

Collecting sympy
Downloading sympy-1.7.1-py3-none-any.whl (5.9 MB)

 |████████████████████████████████| 5.9 MB 415 kB/s 

Collecting tqdm
Downloading tqdm-4.59.0-py2.py3-none-any.whl (74 kB)

 |████████████████████████████████| 74 kB 616 kB/s 

Collecting mapbox-earcut
Downloading mapbox_earcut-0.12.10-cp38-cp38-macosx_10_9_x86_64.whl (55 kB)

 |████████████████████████████████| 55 kB 650 kB/s 

Collecting matplotlib
Downloading matplotlib-3.3.4-cp38-cp38-macosx_10_9_x86_64.whl (8.5 MB)

 |████████████████████████████████| 8.5 MB 249 kB/s 

Collecting moderngl
Downloading moderngl-5.6.4-cp38-cp38-macosx_10_9_x86_64.whl (144 kB)

 |████████████████████████████████| 144 kB 347 kB/s 

Collecting moderngl_window
Downloading moderngl_window-2.3.0-py3-none-any.whl (126 kB)

 |████████████████████████████████| 126 kB 439 kB/s 

Collecting pydub
Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting pyyaml
Downloading PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl (253 kB)

 |████████████████████████████████| 253 kB 311 kB/s 

Collecting screeninfo
Downloading screeninfo-0.6.7.tar.gz (7.3 kB)
Collecting validators
Downloading validators-0.18.2-py3-none-any.whl (19 kB)
Collecting ipython
Downloading ipython-7.21.0-py3-none-any.whl (784 kB)

 |████████████████████████████████| 784 kB 429 kB/s 

Collecting PyOpenGL
Downloading PyOpenGL-3.1.5-py3-none-any.whl (2.4 MB)

 |████████████████████████████████| 2.4 MB 441 kB/s 

Collecting manimpango

2021 年 4 月 5 日 316
曲淡歌
曲淡歌@admin

2021 年 2 月 27 日

树莓派安装openwrt并扩容overlay分区 

安装的参考

如何安装

步骤

  1. 使用disk genius把内存卡的分区删除,新建一个分区并采用fat32格式化
  2. 用win32diskimage写入镜像

出现问题:

  1. 其他电脑连接wifi
    后无法获取ip,而路由器插上网线后在上级路由里面也查不到ip

解决方案:

连接wifi【openwrt】后,手动修改电脑的ip:192.168.10.x,子网掩码24,网关192.168.10.1,然后就和op在同一网段了,此时访问192.168.10.1即可。

然后在op设置界面:【网络】-【接口】-【LAN】-【修改】里面,将【IPv4网关】设置为192.168.1.1,将【使用自定义的 DNS 服务器】设置为114.114.114.114,此时op便可以获取上级路由的网络(如果不清楚上级路由的情况,则改为dhcp协议,然后用ip扫描来找到op的lan地址)

扩容的参考资料

“【转载】树莓派安装openwrt后扩容-参考资料”

“【转载】openwrt的overlay分区不足解决方法”

使用fdisk扩容的尝试(使用另一台linux)

确定内存卡的盘符

拔掉openwrt的内存卡,换上linux的卡,输入命令:df -h查看硬盘情况

判断/dev/sda是装有openwrt的内存卡,其中2是装有系统的部分(猜测)

卸载盘符

umount /dev/sda2

用fdisk命令开始重新分区

  1. 进入分区程序sudo fdisk /dev/sda
  2. 查看当前分区情况:p
#终端
pi@raspberrypi:~ $ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 7.4 GiB, 7983857664 bytes, 15593472 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf222735e
Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       8192   139263   131072   64M  c W95 FAT32 (LBA)
/dev/sda2        147456  2113535  1966080  960M 83 Linux
/dev/sda3       2113536 15593471 13479936  6.4G 83 Linux

删除分区2、3

删除分区:d

选择删除分区2:2

重复一次,删除3

重新新建分区2

然后新建分区:

分区类型选择主分区:p

分区号输入2:

起始扇区选择原来的点:147456

最后一个扇区选择默认:enter

这样就新建了一个分区2,并且分区包含了剩下的全部空间。

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       8192   139263   131072   64M  c W95 FAT32 (LBA)
/dev/sda2        147456  2113535  1966080  960M 83 Linux
/dev/sda3       2113536 15593471 13479936  6.4G 83 Linux

Command (m for help): d
Partition number (1-3, default 3): 3

Partition 3 has been deleted.

Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-15593471, default 2048): 147456
Last sector, +/-sectors or +/-size{K,M,G,T,P} (147456-15593471, default 15593471):

Created a new partition 2 of type 'Linux' and of size 7.4 GiB.
Partition #2 contains a squashfs signature.

Do you want to remove the signature? [Y]es/[N]o: n

Command (m for help): w

The partition table has been altered.
Syncing disks.

使修改生效

sudo e2fsck /dev/sda2
sudo resize2fs /dev/sda2

出现错误

pi@raspberrypi:~ $ sudo e2fsck /dev/sda2
e2fsck 1.44.5 (15-Dec-2018)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sda2

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 
 or
    e2fsck -b 32768 

/dev/sda2 contains a squashfs file system
pi@raspberrypi:~ $ sudo resize2fs /dev/sda2
resize2fs 1.44.5 (15-Dec-2018)
resize2fs: Bad magic number in super-block while trying to open /dev/sda2
Couldn't find valid filesystem superblock.

这个方法暂时无法使用

在openwrt里面直接扩容

查看设备

输入lsblk

得到

OpenWrt# lsblk
\NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0 787.3M  0 loop /overlay
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0    64M  0 part /boot
└─mmcblk0p2 179:2    0   960M  0 part /rom

得知可以扩容的id为mmcblk0

开始扩容

fdisk /dev/mmcblk0

使用p查看分区

得到:

Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux

得知还有6个多G的空间可用

mkfs.ext4 /dev/mmcblk0p3

第一次重启前全程记录

Using username "root".
root@192.168.1.177's password:
OpenWrt# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               172.8M    172.8M         0 100% /rom
tmpfs                     1.9G      7.8M      1.8G   0% /tmp
/dev/loop0              785.3M    139.8M    645.4M  18% /overlay
overlayfs:/overlay      785.3M    139.8M    645.4M  18% /
/dev/mmcblk0p1           63.9M     17.3M     46.5M  27% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
cgroup                    1.9G         0      1.9G   0% /sys/fs/cgroup
overlayfs:/overlay      785.3M    139.8M    645.4M  18% /opt/docker
OpenWrt# lsblk
\NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0 787.3M  0 loop /overlay
mmcblk0     179:0    0   7.4G  0 disk
├─mmcblk0p1 179:1    0    64M  0 part /boot
└─mmcblk0p2 179:2    0   960M  0 part /rom
OpenWrt# \fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux

Command (m for help): n
Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3):
First sector (2048-15593471, default 2048): +3G
Value out of range.
First sector (2048-15593471, default 2048): +1G
Value out of range.
First sector (2048-15593471, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-15593471, default 15593471): +3G

Created a new partition 3 of type 'Linux' and of size 3 GiB.

Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux
/dev/mmcblk0p3        2048 6293503 6291456    3G 83 Linux

Partition table entries are not in disk order.

Command (m for help): w
The partition table has been altered.
Failed to add partition 3 to system: Resource busy

The kernel still uses the old partitions. The new table will be used at the next reboot.
Syncing disks.

OpenWrt# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux
/dev/mmcblk0p3        2048 6293503 6291456    3G 83 Linux

Partition table entries are not in disk order.

Command (m for help): m

Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table


Command (m for help): d
Partition number (1-3, default 3): 3

Partition 3 has been deleted.

Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux

Command (m for help): w
The partition table has been altered.
Failed to remove partition 3 from system: No such device or address

The kernel still uses the old partitions. The new table will be used at the next reboot.
Syncing disks.

OpenWrt# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *      8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      147456 2113535 1966080  960M 83 Linux

Command (m for help): n
Partition type
   p   primary (2 primary, 0 extended, 2 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (3,4, default 3): 3
First sector (2048-15593471, default 2048): 2113536
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2113536-15593471, default 15593471): +3G

Created a new partition 3 of type 'Linux' and of size 3 GiB.

Command (m for help): p
Disk /dev/mmcblk0: 7.45 GiB, 7983857664 bytes, 15593472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *       8192  139263  131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2       147456 2113535 1966080  960M 83 Linux
/dev/mmcblk0p3      2113536 8404991 6291456    3G 83 Linux

Command (m for help): w
The partition table has been altered.
Syncing disks.

OpenWrt# mkfs.ext4 /dev/mmcblk0p3
mke2fs 1.45.6 (20-Mar-2020)
Discarding device blocks: done
Creating filesystem with 786432 4k blocks and 196608 inodes
Filesystem UUID: 84f1fcef-0224-4409-a211-45f800551e81
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

OpenWrt# reboot

重启后把以前的文件复制到扩容的文件夹

mount -t ext4 /dev/mmcblk0p3 /mnt/mmcblk0p3

发现该目录还不存在

OpenWrt# mount -t ext4 /dev/mmcblk0p3 /mnt/mmcblk0p3
mount: /mnt/mmcblk0p3: mount point does not exist.

于是先使用mkdir /mnt/mmcblk0p3mount -t ext4 /dev/mmcblk0p3 /mnt/mmcblk0p3

再使用df -h查询得到

OpenWrt# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               172.8M    172.8M         0 100% /rom
tmpfs                     1.9G      7.5M      1.8G   0% /tmp
/dev/loop0              785.3M    139.8M    645.4M  18% /overlay
overlayfs:/overlay      785.3M    139.8M    645.4M  18% /
/dev/mmcblk0p1           63.9M     17.3M     46.5M  27% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
cgroup                    1.9G         0      1.9G   0% /sys/fs/cgroup
overlayfs:/overlay      785.3M    139.8M    645.4M  18% /opt/docker
/dev/mmcblk0p3            2.9G      9.0M      2.7G   0% /mnt/mmcblk0p3

说明已经挂载成功

然后看看loop0指向的是哪个目录,发现overlay目录为/overlay

于是将其内容拷贝,命令为:cp -r /overlay/* /mnt/mmcblk0p3

然后卸载umount /dev/mmcblk0p3

提示busy,可以参考linux挂载卸载不掉 umount target is busy

不过因为op上没有安装相应的命令,于是我先尝试reboot

重启之后发现不会自动挂载,再次手动挂载mount -t ext4 /dev/mmcblk0p3 /mnt/mmcblk0p3

再次手动卸载umount /dev/mmcblk0p3

成功

打开openwrt的管理界面

【挂载点】-【生成配置】(如果找不到后面的设备可以使用这一步)-【(/mnt/mmcblk0p3)修改】

重启之后,成功!(之前失败是因为忘记勾选启用此挂载点)

2021 年 2 月 27 日 337
曲淡歌
曲淡歌@admin

2021 年 2 月 27 日

【2021-03-08更新】关于思源笔记服务器docker的部署笔记 

思源笔记

docker服务的布置

  1. 拉取镜像b3log/siyuan
  2. 在宿主机/siyuan/conf下新建文件conf.json,并且提前创建/siyuan/data/思源笔记用户指南
  3. 输入命令docker run -v /siyuan/conf:/siyuan/conf -v /siyuan/data:/siyuan/data -p 6806:6806 b3log/siyuan --resident=true --conf=/siyuan/conf
    4.
内容为
{
   "url": "http://127.0.0.1:6806/siyuan/siyuan/思源笔记用户指南/",
   "name": "思源笔记用户指南",
   "auth": "",
   "user": "",
   "password": "",
   "path": "/siyuan/data/思源笔记用户指南"
}

然后得到我的思源笔记地址:地址

存在的问题

如图所示,无法创建新的文件夹,从而无法建立新的笔记

解决方案

参考资料:

思源笔记 docker 部署问题 – 链滴 (ld246.com)

关于完善思源笔记 dav 与文件管理的个人建议 – 链滴 (ld246.com)

思源 Docker 版不能删除配置的 dav – 链滴 (ld246.com)

有用信息

Docker 创建笔记本的话需要定死一个文件路径,类似在 Android 上那样。目前暂时还没有进行细节设计,如果目前就需要用的话请手动修改 conf.json。

image.png

在树莓派的openwrt中布置

其他流程一致,最后提示

stderr: standard_init_linux.go:211: exec user process caused "exec format error"
stderr: standard_init_linux.go:211: exec user process caused "exec format error"
stderr: standard_init_linux.go:211: exec user process caused "exec format error"

经过分析猜测问题来自于架构的不同,树莓派是arm架构,估计这个项目是x86的,于是前往dockerhub验证

不同架构下docker的兼容问题

docker run 失败 在logs中如下错误,standard_init_linux.go:211: exec user process caused “exec format error“

去github上查到一条可能相关的can’t deploy siyuan server with the docker images b3log/siyuan #1454

docker run -d -p 6806:6806 b3log/siyuan --resident=true

docker exec -it /bin/sh

应该不是这个问题,就是架构的锅

官方镜像地址

根据”#不同架构下docker的兼容问题#”

可知:

解决办法
既然问题根源找到了 ,那就好办了 ,只需要在当前arch的linux上重新docker build 就行 。

docker build相关

Docker build 命令

参考上述资料,打算使用 -f Dockerfile 文件的位置:

$ docker build -f /path/to/a/Dockerfile .

因此需要找到之前pull的image存储位置

猜测是

/opt/docker/vfs/dir/0f1818c5db9de0fcb5b31faeee1bd89cc3ac263d22e854accac223fdbf6e8ef5/

因此命令为docker build -f /opt/docker/vfs/dir/0f1818c5db9de0fcb5b31faeee1bd89cc3ac263d22e854accac223fdbf6e8ef5/

错误! dockerfile是一种特殊的文件,用来描述如何构建一个image

然后,我不会了。就这样吧,下次继续研究。

2021-03-02更新 支持docker打开本地文件啦(2:10 周三,镜像似乎还没更新)

更新日志

Adds booting param for Docker: --data for specifying the path of the data.

拉取命令docker pull b3log/siyuan

因此命令应该为:

docker run -v /siyuan/conf:/siyuan/conf -v /siyuan/data:/siyuan/data -p 6806:6806 b3log/siyuan --resident=true --conf=/siyuan/conf --data=/siyuan/data

2021-03-08 发现使用宝塔的docker管理面板无法获取最新镜像

因此使用命令docker images查看镜像

得到

[root@iz2zehokmzpppxxwrsifshz ~]# docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
b3log/siyuan                   latest              01a241c3b07b        7 weeks ago         133MB
b3log/solo                     latest              2bc398af448b        2 months ago        143MB
radhifadlillah/shiori          latest              69e24681b088        6 months ago        422MB
moritanosuke/wallabag-docker   latest              495f85187162        4 years ago         626MB

然后使用docker rmi 删除目标镜像

这里应该为docker rmi 01a241c3b07b

然后再使用docker pull b3log/siyuan

docker run -v /siyuan/conf:/siyuan/conf -v /siyuan/data:/siyuan/data -p 6806:6806 b3log/siyuan --resident=true --conf=/siyuan/conf --data=/siyuan/data

我发现阿里云,科大的镜像加速更新都很慢,目前最好用的是网易

网易加速地址:https://hub-mirror.c.163.com/

成功进入之后发现需要用户名和密码,用户名为siyuan,密码是随机生成的,在conf.json里面查看

如何让网页版思源和我的webdav共用文件?

思路:因为webdav的目录在wwwroot下,而docker部署的在siyuan/data下,无法直接让这两个文件夹合一,那么可以使用目录链接的方式让二者共享文件吗?

方案

  1. 【不可行】重新构建docker,把数据的位置指定到webdav的目录

那么启动命令应该为:docker run -v /siyuan/conf:/siyuan/conf -v /siyuan/data:/siyuan/data -p 6806:6806 b3log/siyuan --resident=true --conf=/siyuan/conf --data=/www/wwwroot/47.93.237.242/dav

发现怎么都不行,估计是权限的问题

  1. 【可行】重建webdav,将目录改到思源的目录
    参考#搭建webdav#

将其中的代码改为:

location / {
        root /siyuan/data;
        #client_max_body_size 102400M;#大文件支持
        autoindex on;
        dav_methods PUT DELETE MKCOL COPY MOVE;
        # 需要 nginx-dav-ext-module 才有下面的选项
        dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;
        create_full_put_path  on;
    }

此时webdav的配置如下(此处在博客脱敏)
我的webdav地址(注意此处没有dav了)

id

密码

新的问题:#链接webdav后部分文件夹不可见#

连接webdav后只能看到【极客】文件夹,后来发现只要把之前的文件夹改名就能刷新出来,推测是以前的文件修改导致识别不到

保持docker开启

使用发现思源笔记的docker在有时会宕机,因此需要设置一个自动重启,使用docker container update --restart=always

输入为:docker container update --restart=always 4ec8fe06a520

#思源笔记
2021 年 2 月 27 日 328
  • ii.kiss

    2021 年 3 月 28 日

    请问具体步骤和相关设置参数都是什么?我在群晖上想安装一下,但一直都搞不定

    • 曲淡歌

      2021 年 3 月 31 日

      1.拉取镜像
      2.按照上面的代码 docker run..hvo
      大概步骤是这样的,过程我都有记录,有具体的问题你可以写在评论区,群晖的图形界面操作我就不清楚了,建议用命令行

曲淡歌
曲淡歌@admin

2021 年 2 月 22 日

树莓派安装openwrt做软路由使用 

参考资料

固件下载

安装说明

如何安装(转载)

固件格式区别

固件文件名中带有factory字样的文件为安装固件,固件文件名中带有sysupgrade字样的文件为升级固件。固件文件名中带有ext4字样的文件为搭载ext4文件系统固件,ext4格式的固件更适合熟悉Linux系统的用户使用,可以比较方便地调整ext4分区的大小;
固件文件名中带有squashfs字样的文件为搭载squashfs文件系统固件,而squashfs格式的固件适用于“不折腾”的用户,其优点是可以比较方便地进行系统还原(控制面板-系统-备份/升级),哪怕你一不小心玩坏固件,只要还能进入控制面板,就可以很方便地进行“系统还原操作”。以下安装和升级步骤仅适用于树莓派,竞斗云或x86_64设备请按各自原有步骤进行安装/升级操作。

安装

下载固件文件名中带有factory字样的文件到本地,解压即可得到factory格式的img镜像文件。其中,文件名中带有ext4字样的为ext4固件,文件名中带有squashfs字样的为squashfs格式固件,为了避免一些玄学问题,小苏强烈推荐大家按以下步骤操作 :1.将SD卡插入电脑,使用DiskGenius或者PartitionGuru或类似的磁盘管理工具删除SD卡中的所有分区;2.在SD卡中新建一个Fat32分区,保存更改并格式化。此时SD卡便还原为出厂状态;3.使用Win32DiskImager或者Etcher将img固件写入SD卡。如果不按以上步骤操作,很可能在刷入固件后出现无法保存配置,LuCI崩溃的情况。

#[6]
2021 年 2 月 22 日 257
曲淡歌
曲淡歌@admin

2021 年 2 月 22 日

如何用树莓派做WIFI热点发射端/usb共享网络从而做到主动连接树莓派 

参考资料:

1.设置固定IP

2.vnc提示cannot currently show the desktop的解决办法

3.从零开始:树莓派共享 WiFi 秒变无线热点(树莓派路由器

4.树莓派安装 OpenWrt 打造超级路由器

我的usb网段

手机 192.618.186.255
树莓派 192.165.186.30

usb0: flags=4163  mtu 1500
inet 192.168.186.30  netmask 255.255.255.0  broadcast 192.168.186.255
inet6 2408:8466:aa30:213:28ed:8639:45a7:c3d0  prefixlen 64  scopeid 0x0
inet6 fe80::e72c:920a:3992:f2fc  prefixlen 64  scopeid 0x20
ether 42:7d:fe:0f:9f:b0  txqueuelen 1000  (Ethernet)
RX packets 74  bytes 7292 (7.1 KiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 82  bytes 14847 (14.4 KiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

范例(软件):

interface eth0

static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

interface wlan0

static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

范例(树莓派文件):

#interface eth0

#static ip_address=192.168.0.10/24

#static ip6_address=fd51:42f8:caae:d92e::ff/64

仿写:

先输入


sudo nano /etc/dhcpcd.conf

interface usb0
static ip_address=192.168.186.30/24          
static ip6_address=2408:8466:aa30:213:28ed:8639:45a7:c3d0/64

成功!!

#[6]
2021 年 2 月 22 日 166
曲淡歌
曲淡歌@admin

2021 年 2 月 22 日

【转载】刘慈欣在美国版三体后附录的后记全文 

刘慈欣在美国版三体后附录的后记全文

这篇后记是只有美国出版的三体有的

AUTHOR’S POSTSCRIPT FOR THE AMERICAN EDITION

A night from my childhood remains crisply etched in my memory: I was standing by a pond before a village somewhere in Luoshan County, Henan Province, where generations of my ancestors had lived. Next to me stood many other people, both adults and children. Together, we gazed up at the clear night sky, where a tiny star slowly glided across the darkfirmament.

It was the first artificial satellite China had ever launched: Dongfanghong I (“The East is Red I”). The date was April 25, 1970, and I was seven.

It had been thirteen years since Sputnik had been launched into space, and nine years since the first cosmonaut had left the Earth. Just a week earlier, Apollo 13 had safely returned from a perilous journey to the moon.

But I didn’t know any of that. As I gazed at that tiny, gliding star, my heart was filled with indescribable curiosity and yearning. And etched in my memory just as deeply as these feelings was the sensation of hunger. At that time, the region around my village was extremely poor. Hunger was the constant companion of every child. I was relatively fortunate because I had shoes on my feet. Most of the friends standing by my side were barefoot, and some of the tiny feet still had unhealed frostbite from the previous winter. Behind me, faint light from kerosene lamps shone out of cracks in the walls of dilapidated thatched huts—the village wasn’t wired for electricityuntil the eighties.

美国版后记

童年的一个夜晚清晰地刻在我的记忆里:我站在河南省罗山县某村庄的池塘边,我的祖辈曾在这里生活过几代。我旁边站着许多人,有大人也有孩子。我们一起仰望着晴朗的夜空,一颗小星星缓缓划过暗淡的天际。

这是中国发射的第一颗人造卫星:东方红一号。那一天是1970年4月25日,我七岁。

从“斯普特尼克号”(人类第一颗人造卫星)发射到太空已经13年,从第一位宇航员飞出地球也有9年。就在一周前,“阿波罗13号”从险象环生的登月飞行中安全返回月球。

但这些我都不知道。当我凝视着那颗小小的、滑翔的星星时,我的心中充满了难以形容的好奇和向往。

而让我感同身受且记忆深刻的,是腹中的饥饿。那时,这个地区非常贫穷。饥饿伴随着每一个孩子。我比较幸运,因为我的脚上有鞋子。站在我身边的朋友,大部分都是光着脚的,有些小脚丫还长着前一年冬天的冻疮,没有痊愈。在我身后,微弱的煤油灯从破茅草屋墙上的缝隙中透出昏暗的光线——这个村子直到20世纪80年代才通电。

The adults standing nearby said that the satellite wasn’t like an airplane because it flew outside of the Earth. Back then the dust and smoke of industry hadn’t yet polluted the air, and the starry sky was especially clear, with the Milky Way clearly visible. In my mind, the stars that filled the heavens weren’t much farther away than the tiny, gliding satellite, and so I thought it was flying among them. I even worried that it might collide with one as it passed through the dense stellar clusters.

My parents weren’t with mebecause they were working at a coal mine more than a thousand kilometers away, in Shanxi Province. A few years earlier, when I had been even younger, the mine had been a combat zone for the factional civil wars of the Cultural Revolution. I remembered gunshots in the middle of the night, trucks passing in the street, filled with men clutching guns and wearing red armbands.… But I had been too young back then, and I can’t be sure whether these images are real memories, or mirages constructed later. However, I know one thing for certain: Because the mine was too unsafe and my parents had been impacted by the Cultural Revolution, they had had no choice but to send me to my ancestral home village in Henan. By the time I saw Dongfanghong I, I had already lived there for more than three years.

站在旁边的大人说,这颗卫星可不像飞机,它是飞离地球之外的。那时的大气层还没有被工业粉尘和废气污染,繁星璀璨,银河系清晰可见。在我看来,满天星星的距离并不比那颗滑翔的小卫星远多少,所以我想它正飞向星星中间。我甚至担心,它在经过密集的恒星团时会撞上其中一颗。

我的父母不和我在一起,因为他们在一千多公里外的山西省一个煤矿工作。几年前,当我还年轻的时候,矿井一直是文革派系内部的作战区。我记得半夜的枪声, 卡车在街上经过, 满是拿着枪, 戴着红色臂章的男人。但当时我太年轻了,我不能确定这些图像是真实的记忆,还是后来的幻想。然而,我知道一件事:因为矿井太不安全,我的父母也受到了文革的影响,他们别无选择,只能把我送到祖籍地河南。看到东方红的时候,我已经在那里住了三年多了。

A few more years passed before I understood the distance between that satellite and the stars. Back then I was reading a popular set of basic science books called A Hundred Thousand Whys. From the astronomy volume, I learned the concept of a light-year. Before then, I had already known that light could traverse a distance equal to seven and a half trips around the Earth in a single second, but I had not contemplated what kind of terrifying distance could be crossed by flying at such a speed for a whole year. I imagined a ray of light passing through the cold silence of space at the speed of 300,000 kilometers per second. I struggled to grasp the bone-chilling vastness and profundity with my imagination, felt the weight of an immense terror and awe, and simultaneously enjoyed a druglike euphoria.

From that moment, I realized that I had a special talent: Scales and existences that far exceeded the bounds of human sensory perception—both macro and micro—and that seemed to be only abstract numbers to others, could take on concrete forms in my mind. I could touch them and feel them, much like others could touch and feel trees and rocks. Even today, when references to the 15-billion-light-year radius of the universe and “strings” many orders of magnitude smaller than quarks have numbed most people, theconcepts of a light-year or a nanometer can still produce lively, grand pictures in my mind and arouse in me an ineffable, religious feeling of awe and shock. Compared to most of the population who do not experience such sensations, I don’t know if I’m lucky or unlucky. But it is certain that such feelings made me first into a science fiction fan, and later a science fiction author.

过了几年,我才明白那颗卫星和星星之间的距离。当时我正在读一套流行的基础科学书籍,叫做《十万个为什么》。从天文学卷中,我学会了光年的概念。在此之前,我已经知道光可以在一秒钟内穿越相当于七次半左右地球飞行的距离,但我并没有想过以如此快的速度飞行一整年能跨越怎样的可怕距离。我想象着一束光以30万公里/秒的速度穿过寒冷寂静的太空。我努力用我的想象力抓住那令人战栗的深远和辽阔,感受到巨大的恐怖和沉重的敬畏, 同时享受着药物般的兴奋。

从那一刻起,我意识到我有一种特殊的天赋:那些远远超出人类感官范围的尺度存在——无论是宏观还是微观——对别人来说似乎只是抽象的数字,在我脑海中却可以呈现出具象的画面,我可以触摸它们,感受它们,就像其他人可以触摸树木和岩石一样。即使在今天,150亿光年的宇宙半径和比夸克小很多数量级的“弦”令大多数人麻木时,一光年或一纳米的概念仍然能在我的脑海中产生形象且宏伟的画面,并在我心中唤起一种难以言喻的、宗教般的敬畏和震撼感。与大多数没有这种感觉的人相比,我不知道我是幸运还是不幸。但可以肯定的是,这样的感受让我先成为一个科幻迷,后来又变成了科幻作家。

In that same year when I was first awed by the concept of a light-year, a flood (known as the Great Flood of August ’75) occurred near my home village. In a single day, arecord-breaking 100.5 centimeters of rain fell in the Zhumadian region of Henan. Fifty-eight dams of various sizes collapsed, one after another, and 240,000 people died in the resulting deluge. Shortly after the floodwaters had receded, I returned to the village and saw a landscape filled with refugees. I thought I was looking at the end of the world.

And so, satellite, hunger, stars, kerosene lamps, the Milky Way, the Cultural Revolution’s factional civil wars, a light-year, the flood … these seemingly unconnected things melded together and formed the early part of my life, and also molded the science fiction I write today.

在我第一次被光年所震撼的那年,我的家乡附近发生了一场洪水(1975年8月大洪灾)。一天之内,河南驻马店的降雨量突破了100.5厘米。58座大小不一的水坝相继倒塌,24万人死于这场洪灾。洪水退去后不久,我回到村子,已是满目疮痍,到处都是灾民,恍若世界末日的感觉。

于是,卫星、饥饿、繁星、煤油灯、银河、文革、光年、洪水……这些看似无关的事物融合在一起,成为我早年人生的元素,也塑造了我今天的科幻作品。

As a science fiction writer who began as a fan, I do not use my fiction as a disguised way to criticize the reality of the present. I feel that the greatest appeal of science fiction is the creation of numerous imaginary worlds outside of reality. I’ve always felt that the greatest and most beautiful stories in the history of humanity were not sung by wandering bards or written by playwrights and novelists, but told by science. The stories of scienceare far more magnificent, grand, involved, profound, thrilling, strange, terrifying, mysterious, and even emotional, compared to the stories told by literature. Only, these wonderful stories are locked in cold equations that most do not know how to read.

The creation myths of the various peoples and religions of the world pale when compared to the glory of the big bang. The three-billion-year history of life’s evolution from self-reproducing molecules to civilization contains twists and romances that cannot be matched by any myth or epic.

作为一个“科幻迷”出身的科幻作家,我不会用我的小说来隐喻和批判现实。我觉得科幻小说最大的魅力是创造许多现实以外的虚构世界。我一直认为,人类历史上最伟大、最美丽的故事不是由吟诵诗人唱的,不是剧作家和小说家写的,而是由科学讲述的。与文学讲述的故事相比,科学讲的故事更加宏伟壮丽、纷繁复杂、惊悚跌宕、恐怖神秘,甚至更加多愁善感,韵味无穷。只是,这些精彩的故事被锁定在冷方程中,大多数人难以读懂。

与大爆炸的荣耀相比,世界各民族和宗教的创造神话显得苍白无力。生命从可自我复制的分子到智慧文明的30亿年进化史包含着任何神话或史诗都无法比拟的曲折和浪漫。

There is also the poetic vision of space and time in relativity, the weird subatomic world of quantum mechanics … these wondrous stories of science all possess an irresistible attraction. Through the medium of science fiction, I seek only to create my own worlds using the power of imagination, and to make known the poetry of Nature in those worlds, to tell the romantic legends that have unfolded between Man and Universe.

But I cannot escape and leave behind reality, just like I cannot leave behind my shadow. Realitybrands each of us with its indelible mark. Every era puts invisible shackles on those who have lived through it, and I can only dance in my chains. In science fiction, humanity is often described as a collective. In this book, a man named “humanity” confronts a disaster, and everything he demonstrates in the face of existence and annihilation undoubtedly has sources in the reality that I experienced. The wonder of science fiction is that it can, when given certain hypothetical world settings, turn what in our reality is evil and dark into what is righteous and bright, and vice versa. This book and its two sequels try to do just that, but no matter how reality is twisted by imagination, it ultimately remains there.

相对论中有宏观时空的诗意视觉,量子力学中有诡异的亚原子微观世界……这些奇妙的科学故事都具有不可抗拒的吸引力。通过科幻小说的媒介,我利用想象力创造我自己的世界,揭示自然在那些世界中的诗歌,讲述人类和宇宙之间展开的浪漫传说。

但我不能逃避和脱离现实,就像我不能脱离我的影子。现实在每个人身上都标注了不可磨灭的烙印。每个时代都给经历过它的人戴上了无形的枷锁,我只能在这个枷锁中跳舞。在科幻小说中,人类经常被描述为一个整体。在这本书中,一个名叫”人类”的整体面临着灭顶之灾,他们在面对生存和毁灭时所展现出来的一切,无疑都来源于我所经历过的现实。科幻小说的奇迹是, 当我们给某些世界特殊的设定, 它可以把我们现实中邪恶和黑暗的东西变成光明和正义的,反之亦然。《三体》系列试图做到这一点,但无论现实如何被想象力扭曲,它仍然在那里。

I’ve always felt that extraterrestrial intelligence will be the greatest source of uncertainty for humanity’s future. Other great shifts, such as climate change and ecological disasters, have a certain progression and built-in adjustment periods, but contact between humankind and aliens can occur at any time. Perhaps in ten thousand years, the starry skythat humankind gazes upon will remain empty and silent, but perhaps tomorrow we’ll wake up and find an alien spaceship the size of the moon parked in orbit. The appearance of extraterrestrial intelligence will force humanity to confront an Other. Before then, humanity as a whole will never have had an external counterpart. The appearance of this Other, or mere knowledge of its existence, will impact our civilization in unpredictable ways.

我一直觉得外星文明将是人类未来最大的隐忧。其他的大变故,如气候变化和生态灾难,都有一定的过程和缓冲适应期,但人类与外星人的接触随时可能发生。也许一万年后,人类凝视的星空仍将空无一物,寂静无声,但也许明天醒来时,就发现一艘和月球一样大的外星飞船停在地球轨道上。外星文明的出现将迫使人类对抗另一个“他者”。在那之前,人类作为一个整体,从未接触过来自外部的对应物。这个“他者”的出现,或者仅仅知道“他者”的存在,都将对我们的文明产生不可预知的影响。

There’s a strange contradiction revealed by the naïveté and kindness demonstrated by humanity when faced with the universe: On Earth, humankind can step onto another continent, and without a thought, destroy the kindred civilizations found there through warfare and disease. But when they gaze up at the stars, they turn sentimental and believe that if extraterrestrial intelligences exist, they must be civilizations bound by universal, noble, moral constraints, as if cherishing and loving different forms of life are parts of a self-evident universal code of conduct.

I think it should be precisely the opposite: Let’s turn the kindnesswe show toward the stars to members of the human race on Earth and build up the trust and understanding between the different peoples and civilizations that make up humanity. But for the universe outside the solar system, we should be ever vigilant, and be ready to attribute the worst of intentions to any Others that might exist in space. For a fragile civilization like ours, this is without a doubt the most responsible path.

As a fan of science fiction, it has molded my life, and aconsiderable part of the science fiction I’ve read comes from America. The fact that American readers can now enjoy my book makes me both pleased and excited. Science fiction is a literature that belongs to all humankind. It portrays events of interest to all of humanity, and thus science fiction should be the literary genre most accessible to readers of different nations. Science fiction often describes a day when humanity will form a harmonious whole, and I believe the arrival of such a day need not wait for the appearance ofextraterrestrials.

人类面对宇宙时所表现出的天真和善良揭示出一种矛盾:在地球上,人类可以毫无顾忌地踏进另一个大陆,通过战争和瘟疫摧毁那里的同胞。但是,当他们凝望星星时,却变得感性,他们相信,如果外星文明存在,它们当然是受普遍、高尚、道德约束的文明,仿佛珍爱其他文明是理所当然的宇宙行为准则。

我认为应该恰恰相反:让我们把对外星人的善意转移到地球的人类同胞身上,建立不同民族和文明之间的信任和理解。但对于太阳系以外的宇宙,我们应该时刻保持警惕,并将最坏的恶意归于太空中可能存在的任何人。对于像我们这样弱小的文明来说,这无疑是最负责任的道路。

作为科幻小说的粉丝,它塑造了我的生活,我读过的科幻小说中,有一部分来自美国。我很高兴美国读者现在可以享受我的书。科幻小说是属于全人类的文学作品。它描绘了全人类感兴趣的事件,因此科幻小说应该是不同国家读者最易接触到的文学流派。科幻小说经常描述人类将形成一个和谐的整体,我相信这一天的到来不需要等待外星的出现。


PS:大刘也是钓鱼达人了

#三体
2021 年 2 月 22 日 277

Loading...
载入中

已到底部

没有可加载的页面

C
写微博
S
搜索
J
下一篇微博/评论
K
上一篇微博/评论
R
回复
E
编辑
O
显示隐藏评论
T
回顶部
L
登录
H
显示隐藏帮助
Ctrl+Enter
提交发布
ESC
取消并清除内容