我尝试了网络上的所有方法,但无法通过终端安装 flask-mysql db。我总是遇到这个错误。
"ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/78/j5s7f35s7tbfp971ftclk9d00000gn/T/pip-install-dfntjsy3/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/78/j5s7f35s7tbfp971ftclk9d00000gn/T/pip-install-dfntjsy3/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/78/j5s7f35s7tbfp971ftclk9d00000gn/T/pip-record-wl2niv7i/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/mysqlclient Check the logs for full command output."
编辑:为便于阅读而格式化的错误字符串:
#"ERROR: Command errored out with exit status 1:
#/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c
import sys, setuptools, tokenize;
sys.argv[0] = '/private/var/folders/78/j5s7f35s7tbfp971ftclk9d00000gn/T/pip-install-dfntjsy3/mysqlclient/setup.py'
__file__= '/private/var/folders/78/j5s7f35s7tbfp971ftclk9d00000gn/T/pip-install-dfntjsy3/mysqlclient/setup.py'
f=getattr(tokenize, 'open', open)(__file__);
code=f.read().replace('\r\n', '\n');
f.close();
exec(compile(code, __file__, 'exec'))
#install
#--record /private/var/folders/78/j5s7f35s7tbfp971ftclk9d00000gn/T/pip-record-wl2niv7i/install-record.txt
#--single-version-externally-managed
#--compile
#--install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/mysqlclient
#Check the logs for full command output."