因为要安装hugging face上的Diffusers,所以安装了一系列的东西,前面的Xcode,git安装的都比较顺利,到安装safetensors时出现了问题…
问题1:没有安装Rust compiler
解决方法:
在终端输入:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
出现一大堆码,最后是:
Current installation options:
default host triple: aarch64-apple-darwin
default toolchain: stable (default)
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
输入1即可
最后出现这样一段,按它的操作即可:
To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).
To configure your current shell, run:
source "$HOME/.cargo/env"
这样问题1就解决了
问题2:can't find crate for 'core'
解决方法:Error code E0463,我按照它的help,在终端输入
rustup target add x86_64-apple-darwin
然后重新下载safetensors,就成功了。
收获:看终端上的error一定要往上翻,红字的报错往往不是根本原因,当时红字显示can not bulid wheel for safetensors...,我就复制这句话去Google,根本搜不出来解决方法。
不说了,去装Diffusers了。