Tencent / Metis

Metis is a learnware platform in the field of AIOps.
Other
1.69k stars 494 forks source link

pip install MySQL-python==1.2.5 failing without mysqlclient #112

Closed alexanderqiu closed 2 years ago

alexanderqiu commented 2 years ago

ERROR: Failed building wheel for MySQL-python Running setup.py clean for MySQL-python Failed to build MySQL-python Installing collected packages: MySQL-python Running setup.py install for MySQL-python ... error ERROR: Command errored out with exit status 1: command: /Users/long/work/metis-web/venv2.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/q6/klf2zgcd4g3_y9kp6tyllbcm0000gn/T/pip-install-EmiYzB/mysql-python/setup.py'"'"'; file='"'"'/private/var/folders/q6/klf2zgcd4g3_y9kp6tyllbcm0000gn/T/pip-install-EmiYzB/mysql-python/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/q6/klf2zgcd4g3_y9kp6tyllbcm0000gn/T/pip-record-BY3sh3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/long/work/metis-web/venv2.7/include/site/python2.7/MySQL-python cwd: /private/var/folders/q6/klf2zgcd4g3_y9kp6tyllbcm0000gn/T/pip-install-EmiYzB/mysql-python/ Complete output (30 lines): running install running build running build_py creating build creating build/lib.macosx-12.2-x86_64-2.7 copying mysql_exceptions.py -> build/lib.macosx-12.2-x86_64-2.7 creating build/lib.macosx-12.2-x86_64-2.7/MySQLdb copying MySQLdb/init.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb copying MySQLdb/converters.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb copying MySQLdb/connections.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb copying MySQLdb/cursors.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb copying MySQLdb/release.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb copying MySQLdb/times.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb creating build/lib.macosx-12.2-x86_64-2.7/MySQLdb/constants copying MySQLdb/constants/init.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb/constants copying MySQLdb/constants/CR.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb/constants copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb/constants copying MySQLdb/constants/ER.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb/constants copying MySQLdb/constants/FLAG.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb/constants copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb/constants copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-12.2-x86_64-2.7/MySQLdb/constants running build_ext building 'mysql' extension creating build/temp.macosx-12.2-x86_64-2.7 cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -iwithsysroot /usr/local/libressl/include -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,5,'final',1) -D__version=1.2.5 -I/usr/local/Cellar/mysql/8.0.28_1/include/mysql -I/Users/long/work/metis-web/venv2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-12.2-x86_64-2.7/_mysql.o _mysql.c:44:10: fatal error: 'my_config.h' file not found

include "my_config.h"

^~~~~ 1 error generated. error: command 'cc' failed with exit status 1

ERROR: Command errored out with exit status 1: /Users/long/work/metis-web/venv2.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/q6/klf2zgcd4g3_y9kp6tyllbcm0000gn/T/pip-install-EmiYzB/mysql-python/setup.py'"'"'; file='"'"'/private/var/folders/q6/klf2zgcd4g3_y9kp6tyllbcm0000gn/T/pip-install-EmiYzB/mysql-python/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/q6/klf2zgcd4g3_y9kp6tyllbcm0000gn/T/pip-record-BY3sh3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/long/work/metis-web/venv2.7/include/site/python2.7/MySQL-python Check the logs for full command output.