Pycharm无法安装Python Mysql 1.2.5

如何解决Pycharm无法安装Python Mysql 1.2.5

我一直在尝试从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

注释:

上面列出的所有模块都是同一件事

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-