英文:
OSError: no library called "cairo-2" was found - I am using mac m1 chip
问题
尝试使用brew安装: brew install cairo
。
然后将以下行添加到我的.bashrc
和.zshrc
文件:
export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH
。
但仍然出现相同的错误。
我甚至尝试了这些:
-
brew install cairo pango gdk-pixbuf libxml2 libxslt libffi
-
pip install pipwin pipwin install cairocffi
。
我尝试在Mac M1上运行一个具有一些依赖项的Flask项目,但出现了这个错误。
英文:
I tried to install it using brew: brew install cairo
.
Then added the following line to my .bashrc
and .zshrc
file:
export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH
But it is still giving me the same error.
I even tried those:
-
brew install cairo pango gdk-pixbuf libxml2 libxslt libffi
-
pip install pipwin
pipwin install cairocffi
I tried to run a flask project which had some dependencies in a mac m1 and it is giving me this error
答案1
得分: 1
你需要前往你的 macOS 中的“应用程序” -> “实用工具”,然后找到“终端”应用,右键点击它,选择“获取信息”,然后勾选“使用 Rosetta 打开”。
接着,打开终端并输入以下命令:
brew install cairo
brew install pango
要执行这些命令,你需要先安装 Homebrew,你可以查看 brew 文档 获取更多信息。
英文:
You have to go to your Applications -> Utilities in your mac and there will be Terminal
right click it click Get Info
then check Open using Rosetta
.
Then open a terminal and write:
brew install cairo
brew install pango
To do this you should have installed Homebrew you can check the brew docs.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论