AI_report
2026/6/20 0:06:28 网站建设 项目流程

安装基础依赖包

pip3 install pydub pip3 install loguru pip3 install pandas

安装docx依赖

① 先用 apt 装系统 lxml(通常是有的)

sudo apt update
sudo apt install -y python3-lxml

② 再用 pip 装 python-docx(不装依赖)

pip3 install python-docx --no-deps

👉 因为:

  • python-docx本身是纯 Python

  • 依赖只有lxml

  • 我们已经提前解决了lxml

安装LibreOffice

如果这台 sophon 机器允许装软件,直接:

sudo apt install -y libreoffice

或者精简一点(只要转 PDF):

sudo apt install -y libreoffice-writer

验证:

which libreoffice libreoffice --version

正常安装特别慢,建议换国内 ARM 镜像源(立刻提速)

ports.ubuntu.com在国内基本必慢
必须换成清华 / 阿里 / 中科大 ARM ports 镜像

⭐ 推荐:清华 TUNA(ARM 支持最好)

1️⃣ 备份原 sources.list

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2️⃣ 替换为清华 ARM ports 源

sudo nano /etc/apt/sources.list

全部替换为:

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main universe multiverse restricted deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main universe multiverse restricted deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main universe multiverse restricted

保存退出。


3️⃣ 更新 + 继续安装(断点续下)

sudo apt clean sudo apt update sudo apt install -y libreoffice-writer

⚠️强烈建议用libreoffice-writer,别装全家桶 libreoffice

  • 转 docx → pdf只需要 writer

  • 体积小很多(但还是不小)

👉 一般会从kB/s → MB/s

安装字体

解压目录下的字体

unzip SourceHanSansSC.zip

sudo mkdir -p /usr/share/fonts/source-han-sans sudo cp SourceHanSansSC/*.otf /usr/share/fonts/source-han-sans/

3️⃣ 刷新字体缓存(非常关键)

sudo fc-cache -fv

4️⃣ 验证系统是否识别成功

fc-list | grep "Source Han Sans"

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询