Intel芯片Mac安装Facebook Seamless Communication报错求助
解决Intel MacOS安装seamless_communication时fairseq2n找不到的问题
问题根源
fairseq2n 0.1.1官方没有提供Intel架构MacOS的预编译wheel包,pip搜不到匹配的分发版本,导致安装失败。
可行解决办法
办法1:从源码编译fairseq2n
- 先装编译必备工具:
- 没装Homebrew的话先安装:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - 安装cmake、ninja和Python 3.10:
brew install cmake ninja python@3.10 - 把Python 3.10加入PATH:
echo 'export PATH="/usr/local/opt/python@3.10/bin:$PATH"' >> ~/.zshrc(用bash就改~/.bashrc),然后重启终端或者执行source ~/.zshrc生效
- 没装Homebrew的话先安装:
- 拉取fairseq2代码并切到0.1.1版本:
git clone --recurse-submodules https://github.com/facebookresearch/fairseq2.git cd fairseq2 git checkout v0.1.1 - 编译并安装:
编译耗时大概十几分钟,确保Mac内存足够(建议8G以上),网络稳定。pip install -e . --no-build-isolation
办法2:降级seamless_communication版本
不想编译的话,试试安装旧版本,它依赖的fairseq2可能有Intel Mac兼容包:
pip install seamless_communication==0.0.1
办法3:用conda环境辅助安装
如果平时用conda,可以这么操作:
conda create -n seamless python=3.10 conda activate seamless conda install cmake ninja pip install fairseq2@git+https://github.com/facebookresearch/fairseq2.git@v0.1.1#subdirectory=bindings/python pip install seamless_communication
内容的提问来源于stack exchange,提问作者Mahdi
相关产品推荐
相关产品推荐

