mysql安装退出,MySQL-python安装失败,退出状态为1120

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\

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

解决方案

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值