无法打开输入文件mysql_错误LNK1181,pip安装“无法打开输入文件”mysqlclient.lib'"...

我是Python新手,正在尝试安装mysql模块,但是在解决了其他5个问题之后,我现在遇到了一个问题,当我尝试安装该模块时,会出现以下日志:PS C:\Users\ùposte> pip install mysql

Collecting mysql

Using cached mysql-0.0.1.tar.gz

Collecting MySQL-python (from mysql)

Using cached MySQL-python-1.2.5.zip

Installing collected packages: MySQL-python, mysql

Running setup.py install for MySQL-python ... error

Complete output from command c:\users\ùposte\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\POSTE~2\\AppData\\Local\\Temp\\pip-build-l2boilyg\\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\POSTE~2\AppData\Local\Temp\pip-74885xzp-record\install-record.txt --single-version-externally-managed --compile:

running install

running build

running build_py

creating build

creating build\lib.win32-3.6

copying _mysql_exceptions.py -> build\lib.win32-3.6

creating build\lib.win32-3.6\MySQLdb

copying MySQLdb\__init__.py -> build\lib.win32-3.6\MySQLdb

copying MySQLdb\converters.py -> build\lib.win32-3.6\MySQLdb

copying MySQLdb\connections.py -> build\lib.win32-3.6\MySQLdb

copying MySQLdb\cursors.py -> build\lib.win32-3.6\MySQLdb

copying MySQLdb\release.py -> build\lib.win32-3.6\MySQLdb

copying MySQLdb\times.py -> build\lib.win32-3.6\MySQLdb

creating build\lib.win32-3.6\MySQLdb\constants

copying MySQLdb\constants\__init__.py -> build\lib.win32-3.6\MySQLdb\constants

copying MySQLdb\constants\CR.py -> build\lib.win32-3.6\MySQLdb\constants

copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.6\MySQLdb\constants

copying MySQLdb\constants\ER.py -> build\lib.win32-3.6\MySQLdb\constants

copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.6\MySQLdb\constants

copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.6\MySQLdb\constants

copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.6\MySQLdb\constants

running build_ext

building '_mysql' extension

creating build\temp.win32-3.6

creating build\temp.win32-3.6\Release

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\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:\users\ùposte\appdata\local\programs\python\python36-32\include -Ic:\users\ùposte\appdata\local\programs\python\python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /Tc_mysql.c /Fobuild\temp.win32-3.6\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.16299.0\ucrt\corecrt_math.h(275): 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:\users\—poste\appdata\local\programs\python\python36-32\include\pyconfig.h(324): 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:\users\—poste\appdata\local\programs\python\python36-32\include\pyconfig.h(602): note: see previous definition of 'HAVE_STDDEF_H'

_mysql.c(297): warning C4090: '=': different 'const' qualifiers

_mysql.c(327): warning C4090: '=': different 'const' qualifiers

_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(1165): warning C4090: '=': different 'const' qualifiers

_mysql.c(1532): warning C4018: '

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\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:\users\ùposte\appdata\local\programs\python\python36-32\libs /LIBPATH:c:\users\ùposte\appdata\local\programs\python\python36-32\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x86" kernel32.lib advapi32.lib wsock32.lib mysqlclient.lib /EXPORT:PyInit__mysql build\temp.win32-3.6\Release\_mysql.obj /OUT:build\lib.win32-3.6\_mysql.cp36-win32.pyd /IMPLIB:build\temp.win32-3.6\Release\_mysql.cp36-win32.lib

LINK : fatal error LNK1181: cannot open input file 'mysqlclient.lib'

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1181

----------------------------------------

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

PS C:\Users\ùposte>

pip安装mysql python和我需要的所有东西都是相同的错误。。在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值