问题描述
我一直在尝试从Pycharm安装MysqL-Python 1.2.5。 这是我的点子清单: https://prnt.sc/u6ccac
我的python版本:Python 3.7.3 已经安装了MysqLclient: https://prnt.sc/u6cesn
仍然,无法安装MysqL-Python。 这是屏幕截图的错误: enter image description here
这是命令输出:
Collecting MysqL-python
Using cached MysqL-python-1.2.5.zip (108 kB)
Building wheels for collected packages: MysqL-python
Building wheel for MysqL-python (setup.py): started
Building wheel for MysqL-python (setup.py): finished with status 'error'
Running setup.py clean for MysqL-python
Failed to build MysqL-python
Installing collected packages: MysqL-python
Running setup.py install for MysqL-python: started
Running setup.py install for MysqL-python: finished with status 'error'
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable,possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\python37\python.exe' -u -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'C:\\Users\\poison\\AppData\\Local\\Temp\\pycharm-packaging\\MysqL-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\poison\\AppData\\Local\\Temp\\pycharm-packaging\\MysqL-python\\setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\poison\AppData\Local\Temp\pip-wheel-jfgonzmq'
cwd: C:\Users\poison\AppData\Local\Temp\pycharm-packaging\MysqL-python\
Complete output (117 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying _MysqL_exceptions.py -> build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\__init__.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\converters.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\connections.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\cursors.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\release.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\times.py -> build\lib.win-amd64-3.7\MysqLdb
creating build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\__init__.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\CR.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\ER.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\FLAG.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\REFRESH.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\CLIENT.py -> build\lib.win-amd64-3.7\MysqLdb\constants
running build_ext
building '_MysqL' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\include" "-IC:\Program Files\python37\include" "-IC:\Program Files\python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFxsdk\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tc_MysqL.c /Fobuild\temp.win-amd64-3.7\Release\_MysqL.obj /Zl
_MysqL.c
C:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\include\config-win.h(192): warning C4005: 'isnan': macro redeFinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\corecrt_math.h(276): note: see prevIoUs deFinition of 'isnan'
C:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\include\config-win.h(203): warning C4005: 'SIZEOF_OFF_T': macro redeFinition
C:\Program Files\python37\include\pyconfig.h(291): note: see prevIoUs deFinition of 'SIZEOF_OFF_T'
C:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\include\config-win.h(301): warning C4005: 'HAVE_STDDEF_H': macro redeFinition
C:\Program Files\python37\include\pyconfig.h(580): note: see prevIoUs deFinition of 'HAVE_STDDEF_H'
_MysqL.c(287): warning C4244: '=': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(297): warning C4090: '=': different 'const' qualifiers
_MysqL.c(317): warning C4244: '=': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(327): warning C4090: '=': different 'const' qualifiers
_MysqL.c(470): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(623): warning C4090: '=': different 'const' qualifiers
_MysqL.c(624): warning C4090: '=': different 'const' qualifiers
_MysqL.c(625): warning C4090: '=': different 'const' qualifiers
_MysqL.c(626): warning C4090: '=': different 'const' qualifiers
_MysqL.c(627): warning C4090: '=': different 'const' qualifiers
_MysqL.c(1118): warning C4090: '=': different 'const' qualifiers
_MysqL.c(1161): warning C4090: '=': different 'const' qualifiers
_MysqL.c(1162): warning C4244: '=': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(1165): warning C4090: '=': different 'const' qualifiers
_MysqL.c(1274): warning C4244: '=': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(1466): warning C4267: '=': conversion from 'size_t' to 'int',possible loss of data
_MysqL.c(1468): warning C4267: '=': conversion from 'size_t' to 'int',possible loss of data
_MysqL.c(1504): warning C4267: '=': conversion from 'size_t' to 'int',possible loss of data
_MysqL.c(1506): warning C4267: '=': conversion from 'size_t' to 'int',possible loss of data
_MysqL.c(1532): warning C4018: '<': signed/unsigned mismatch
_MysqL.c(2238): warning C4311: 'type cast': pointer truncation from '_MysqL_ConnectionObject *' to 'long'
_MysqL.c(2241): warning C4311: 'type cast': pointer truncation from '_MysqL_ConnectionObject *' to 'long'
_MysqL.c(2302): warning C4244: 'function': conversion from '__int64' to 'long',possible loss of data
_MysqL.c(2321): warning C4311: 'type cast': pointer truncation from '_MysqL_ResultObject *' to 'long'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMbed,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\lib\opt" "/LIBPATH:C:\Program Files\python37\libs" "/LIBPATH:C:\Program Files\python37\PCbuild\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFxsdk\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" kernel32.lib advapi32.lib wsock32.lib MysqLclient.lib /EXPORT:PyInit__MysqL build\temp.win-amd64-3.7\Release\_MysqL.obj /OUT:build\lib.win-amd64-3.7\_MysqL.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\_MysqL.cp37-win_amd64.lib
Creating library build\temp.win-amd64-3.7\Release\_MysqL.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\_MysqL.cp37-win_amd64.exp
_MysqL.obj : error LNK2001: unresolved external symbol __security_check_cookie
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_field_count
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_warning_count
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_num_rows
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_shutdown
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_real_query
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_ping
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_stat
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_insert_id
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_next_result
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_ssl_set
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_proto_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_store_result
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_change_user
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_character_set_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_commit
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_server_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_data_seek
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_errno
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_real_connect
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_rollback
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_options
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_host_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_fetch_lengths
_MysqL.obj : error LNK2001: unresolved external symbol __imp_strncpy
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_affected_rows
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_real_escape_string
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_debug
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_set_server_option
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_set_character_set
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_dump_debug_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_row_tell
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_close
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_server_end
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_client_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_server_init
_MysqL.obj : error LNK2001: unresolved external symbol __imp___stdio_common_vsprintf
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_free_result
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_fetch_row
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_thread_safe
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_fetch_fields
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_character_set_name
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_escape_string
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_num_fields
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_kill
_MysqL.obj : error LNK2001: unresolved external symbol __imp_strncat
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_use_result
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_select_db
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_sqlstate
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_init
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_row_seek
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_autocommit
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_error
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_thread_id
LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup
build\lib.win-amd64-3.7\_MysqL.cp37-win_amd64.pyd : Fatal error LNK1120: 56 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\link.exe' Failed with exit status 1120
----------------------------------------
ERROR: Failed building wheel for MysqL-python
DEPRECATION: Could not build wheels for MysqL-python which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
ERROR: Command errored out with exit status 1:
command: 'C:\Program Files\python37\python.exe' -u -c 'import sys,'"'"'exec'"'"'))' install --record 'C:\Users\poison\AppData\Local\Temp\pip-record-3w457344\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Program Files\python37\Include\MysqL-python'
cwd: C:\Users\poison\AppData\Local\Temp\pycharm-packaging\MysqL-python\
Complete output (117 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying _MysqL_exceptions.py -> build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\__init__.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\converters.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\connections.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\cursors.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\release.py -> build\lib.win-amd64-3.7\MysqLdb
copying MysqLdb\times.py -> build\lib.win-amd64-3.7\MysqLdb
creating build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\__init__.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\CR.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\ER.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\FLAG.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\REFRESH.py -> build\lib.win-amd64-3.7\MysqLdb\constants
copying MysqLdb\constants\CLIENT.py -> build\lib.win-amd64-3.7\MysqLdb\constants
running build_ext
building '_MysqL' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\include" "-IC:\Program Files\python37\include" "-IC:\Program Files\python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFxsdk\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tc_MysqL.c /Fobuild\temp.win-amd64-3.7\Release\_MysqL.obj /Zl
_MysqL.c
C:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\include\config-win.h(192): warning C4005: 'isnan': macro redeFinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\corecrt_math.h(276): note: see prevIoUs deFinition of 'isnan'
C:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\include\config-win.h(203): warning C4005: 'SIZEOF_OFF_T': macro redeFinition
C:\Program Files\python37\include\pyconfig.h(291): note: see prevIoUs deFinition of 'SIZEOF_OFF_T'
C:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\include\config-win.h(301): warning C4005: 'HAVE_STDDEF_H': macro redeFinition
C:\Program Files\python37\include\pyconfig.h(580): note: see prevIoUs deFinition of 'HAVE_STDDEF_H'
_MysqL.c(287): warning C4244: '=': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(297): warning C4090: '=': different 'const' qualifiers
_MysqL.c(317): warning C4244: '=': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(327): warning C4090: '=': different 'const' qualifiers
_MysqL.c(470): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(623): warning C4090: '=': different 'const' qualifiers
_MysqL.c(624): warning C4090: '=': different 'const' qualifiers
_MysqL.c(625): warning C4090: '=': different 'const' qualifiers
_MysqL.c(626): warning C4090: '=': different 'const' qualifiers
_MysqL.c(627): warning C4090: '=': different 'const' qualifiers
_MysqL.c(1118): warning C4090: '=': different 'const' qualifiers
_MysqL.c(1161): warning C4090: '=': different 'const' qualifiers
_MysqL.c(1162): warning C4244: '=': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(1165): warning C4090: '=': different 'const' qualifiers
_MysqL.c(1274): warning C4244: '=': conversion from 'Py_ssize_t' to 'int',possible loss of data
_MysqL.c(1466): warning C4267: '=': conversion from 'size_t' to 'int',possible loss of data
_MysqL.c(1468): warning C4267: '=': conversion from 'size_t' to 'int',possible loss of data
_MysqL.c(1504): warning C4267: '=': conversion from 'size_t' to 'int',possible loss of data
_MysqL.c(1506): warning C4267: '=': conversion from 'size_t' to 'int',possible loss of data
_MysqL.c(1532): warning C4018: '<': signed/unsigned mismatch
_MysqL.c(2238): warning C4311: 'type cast': pointer truncation from '_MysqL_ConnectionObject *' to 'long'
_MysqL.c(2241): warning C4311: 'type cast': pointer truncation from '_MysqL_ConnectionObject *' to 'long'
_MysqL.c(2302): warning C4244: 'function': conversion from '__int64' to 'long',possible loss of data
_MysqL.c(2321): warning C4311: 'type cast': pointer truncation from '_MysqL_ResultObject *' to 'long'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMbed,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files (x86)\MysqL\MysqL Connector C 6.0.2\lib\opt" "/LIBPATH:C:\Program Files\python37\libs" "/LIBPATH:C:\Program Files\python37\PCbuild\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFxsdk\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" kernel32.lib advapi32.lib wsock32.lib MysqLclient.lib /EXPORT:PyInit__MysqL build\temp.win-amd64-3.7\Release\_MysqL.obj /OUT:build\lib.win-amd64-3.7\_MysqL.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\_MysqL.cp37-win_amd64.lib
Creating library build\temp.win-amd64-3.7\Release\_MysqL.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\_MysqL.cp37-win_amd64.exp
_MysqL.obj : error LNK2001: unresolved external symbol __security_check_cookie
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_field_count
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_warning_count
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_num_rows
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_shutdown
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_real_query
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_ping
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_stat
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_insert_id
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_next_result
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_ssl_set
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_proto_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_store_result
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_change_user
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_character_set_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_commit
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_server_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_data_seek
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_errno
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_real_connect
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_rollback
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_options
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_host_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_fetch_lengths
_MysqL.obj : error LNK2001: unresolved external symbol __imp_strncpy
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_affected_rows
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_real_escape_string
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_debug
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_set_server_option
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_set_character_set
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_dump_debug_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_row_tell
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_close
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_server_end
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_get_client_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_server_init
_MysqL.obj : error LNK2001: unresolved external symbol __imp___stdio_common_vsprintf
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_free_result
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_fetch_row
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_thread_safe
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_fetch_fields
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_character_set_name
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_info
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_escape_string
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_num_fields
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_kill
_MysqL.obj : error LNK2001: unresolved external symbol __imp_strncat
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_use_result
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_select_db
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_sqlstate
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_init
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_row_seek
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_autocommit
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_error
_MysqL.obj : error LNK2001: unresolved external symbol MysqL_thread_id
LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup
build\lib.win-amd64-3.7\_MysqL.cp37-win_amd64.pyd : Fatal error LNK1120: 56 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\link.exe' Failed with exit status 1120
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Program Files\python37\python.exe' -u -c 'import sys,'"'"'exec'"'"'))' install --record 'C:\Users\poison\AppData\Local\Temp\pip-record-3w457344\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Program Files\python37\Include\MysqL-python' Check the logs for full command output.
解决方法
尝试在那里安装其他选项,例如pymysql,mysql-connector和mysql-connector-python
或使用点子
pip install pymysql
pip install mysql-connector
pip install mysql-connector-python
注释:
上面列出的所有模块都是同一件事