Ubuntu18.04手动安装Graphite synthesize遇错误及whisper依赖问题求助
Ubuntu 18.04手动安装Graphite的两类错误解决方案
一、解决ModuleNotFoundError: No module named 'setuptools_rust'
你的环境默认python调用2.7,但安装脚本实际使用Python3,所有依赖安装需针对Python3执行:
- 安装Rust编译环境(cryptography依赖Rust):
sudo apt update && sudo apt install rustc cargo -y - 升级Python3的setuptools并安装setuptools-rust:
pip3 install --upgrade setuptools setuptools-rust - 可提前手动安装cryptography确保依赖正常:
pip3 install cryptography - 重新运行
sudo ./install脚本
二、解决whisper克隆超时(fatal: unable to connect to github.com)
该问题为网络无法连接GitHub导致,可通过以下两种方式解决:
方式1:修改requirements.txt的克隆协议
- 进入carbon目录,打开
requirements.txt - 找到whisper的安装行,将SSH地址替换为HTTPS地址:
原内容示例:
git+ssh://git@github.com/graphite-project/whisper.git@1.1.0#egg=whisper
修改后:git+https://github.com/graphite-project/whisper.git@1.1.0#egg=whisper - 重新执行依赖安装:
pip3 install -r requirements.txt
方式2:手动安装whisper
若网络限制无法直接克隆,可手动下载安装:
- 用HTTPS克隆whisper仓库:
git clone https://github.com/graphite-project/whisper.git - 进入仓库目录,切换到对应版本(以1.1.0为例)并安装:
cd whisper git checkout 1.1.0 pip3 install . - 回到carbon目录,重新运行安装脚本
内网环境额外处理
如果是内网,需给pip3设置代理后再执行安装:
pip3 install --proxy=http://你的代理IP:端口 -r requirements.txt
内容的提问来源于stack exchange,提问作者JBryan
相关产品推荐
相关产品推荐

