[英]How can i solve “architecture not supported” when installing flask_mysqldb in venv
i got this error when i run pip install flask-mysqldb
in my project venv:当我在我的项目 venv 中运行pip install flask-mysqldb
时出现此错误:
In file included from MySQLdb/_mysql.c:29:
In file included from /usr/local/Cellar/mysql/8.0.23_1/include/mysql/mysql.h:46:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h:81:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h:37:2: error: architecture not supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1
I have python 3.8.2我有 python 3.8.2
It seems that you have a MacOS.看来你有一个MacOS。 Check which clang
are you using, as it seems that it is the source of your error.检查您使用的是哪个clang
,因为它似乎是您的错误的根源。 If it shows you some error when trying to run the clang
command directly from your console, try to do a fresh Xcode installation with xcode-select --install
.如果在尝试直接从控制台运行clang
命令时显示一些错误,请尝试使用xcode-select --install
进行全新的 Xcode 安装。 By doing so, maybe you can run now the clang
command without errors, and therefore, install the pip library.通过这样做,也许您现在可以运行clang
命令而不会出错,因此,安装 pip 库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.