我正在尝试安装MySQL-python,但是会不断收到错误消息?

时间:2019-01-26 13:00:21

标签: mysql installation

我正在尝试安装MySql

我已经下载了适用于Python27的Microsft Virtual C +。 我已经在控制面板中将MySQL添加到环境变量中

我已经从文件https://www.lfd.uci.edu/~gohlke/pythonlibs/下载了版本

我正在尝试安装MySQL-python,但始终收到此错误

_mysql.obj : error LNK2019: unresolved external symbol mysql_real_query referenced in function _mysql_ConnectionObject_query
    _mysql.obj : error LNK2019: unresolved external symbol mysql_select_db referenced in function _mysql_ConnectionObject_select_db
    _mysql.obj : error LNK2019: unresolved external symbol mysql_shutdown referenced in function _mysql_ConnectionObject_shutdown
    _mysql.obj : error LNK2019: unresolved external symbol mysql_stat referenced in function _mysql_ConnectionObject_stat
    _mysql.obj : error LNK2019: unresolved external symbol mysql_thread_id referenced in function _mysql_ConnectionObject_thread_id
    _mysql.obj : error LNK2019: unresolved external symbol __imp_sprintf referenced in function _mysql_ConnectionObject_repr
    _mysql.obj : error LNK2019: unresolved external symbol mysql_data_seek referenced in function _mysql_ResultObject_data_seek
    _mysql.obj : error LNK2019: unresolved external symbol mysql_row_seek referenced in function _mysql_ResultObject_row_seek
    _mysql.obj : error LNK2019: unresolved external symbol mysql_row_tell referenced in function _mysql_ResultObject_row_seek
    _mysql.obj : error LNK2019: unresolved external symbol mysql_free_result referenced in function _mysql_ResultObject_dealloc
    LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup
    build\lib.win-amd64-2.7\_mysql.pyd : fatal error LNK1120: 56 unresolved externals
    error: command 'C:\\Users\\Ramsd\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1120

  

命令“ c:\ python27 \ python.exe -u -c”导入设置工具,   tokenize; 文件 ='c:\ users \ ramsd \ appdata \ local \ temp \ pip-install-djrlv0 \ MySQL-python \ setup.py'; f = getattr(tokenize,   '打开',打开)(文件);代码= f.read()。replace('\ r \ n',   '\ n'); f.close(); exec(compile(code, file ,'exec')))“安装   --record c:\ users \ ramsd \ appdata \ local \ temp \ pip-record-s1ycdb \ install-record.txt   --single-version-externally-managed --compile“失败,错误代码为1   c:\ users \ ramsd \ appdata \ local \ temp \ pip-install-djrlv0 \ MySQL-python \“

0 个答案:

没有答案