MySQL-python安装失败,退出状态为1120 [英] MySQL-python install failed with exit status 1120

查看:110
本文介绍了MySQL-python安装失败,退出状态为1120的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我尝试运行pip3 install MySQL-python,我收到了这些错误消息

So I tried running pip3 install MySQL-python and I got these error messages

  mysqlclient.lib(typelib.obj) : error LNK2001: unresolved external symbol ___iob_func
    mysqlclient.lib(viosslfactories.obj) : error LNK2001: unresolved external symbol ___iob_func
    mysqlclient.lib(my_winfile.obj) : error LNK2001: unresolved external symbol ___iob_func
    mysqlclient.lib(my_messnc.obj) : error LNK2001: unresolved external symbol ___iob_func
    mysqlclient.lib(client.obj) : error LNK2001: unresolved external symbol ___iob_func
    mysqlclient.lib(my_thr_init.obj) : error LNK2001: unresolved external symbol ___iob_func
    mysqlclient.lib(my_init.obj) : error LNK2001: unresolved external symbol ___iob_func
    mysqlclient.lib(default.obj) : error LNK2001: unresolved external symbol ___iob_func
    mysqlclient.lib(default.obj) : error LNK2001: unresolved external symbol _printf
    build\lib.win32-3.6\_mysql.cp36-win32.pyd : fatal error LNK1120: 2 unresolved externals
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1120

    ----------------------------------------
Command "c:\users\user\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip-build-pz867vb9\\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 C:\Users\User\AppData\Local\Temp\pip-87_rnd_9-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip-build-pz867vb9\MySQL-python\

我已经安装了Microsoft Visual Studio以及MySQL连接器

I have Microsoft Visual Studio installed as well as the MySQL connector

推荐答案

MySQL-python仅适用于Python2.对于Python 3,您需要mysqlclientmysql-connectorPyMySQL.

MySQL-python is only for Python 2. For Python 3 you need mysqlclient, mysql-connector or PyMySQL.

这篇关于MySQL-python安装失败,退出状态为1120的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆