对于tokenizers库, pypi上缺乏针对macOS
环境预编译包,需要搭建源码编译环境后才能正确安装,步骤如下:
安装rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
pip install setuptools_rust
更新rust环境变量
source $HOME/.cargo/env
安装tokenziers
pip install tokenziers
reference: https://huggingface.co/docs/tokenizers/installation#installation-from-sources
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
由于依赖库之间的版本不兼容,可能会存在版本冲突的情况,大部分情况下不影响正常运行。