安装graphviz模块报错
doubleq@doubleq ~ % brew install graphviz
Running `brew update --auto-update`...
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
brew bundle dump
根据报错提示,需要将命令行从arm指令集切换到x86指令集,因此在命令前加一个arch -x86_64
即可正常安装
arch -x86_64 brew install graphviz
如果要在Python中运行utils.plot_model(model)
,可能还需要一次重启。
参考链接:
https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343