简体   繁体   English

下载适用于Python的SQL时出错

[英]Error when download SQL for Python

when I try to install SQL I get conflicts with Microsoft Visual Studio. 当我尝试安装SQL时,我与Microsoft Visual Studio发生冲突。 please send help. 请发送帮助。 Im using easy install to install it I also tried the other 5 alternative commands but I keep getting built conflicts with Visual Studio and cant find it in add or remove programs (2015) version. 我使用简易安装来安装它,我也尝试了其他5个替代命令,但我与Visual Studio一直存在冲突,无法在添加或删除程序(2015)版本中找到它。 I also installed the connecter 我还安装了连接器

$ easy_install mysql-python
    Searching for mysql-python
    Reading https://pypi.org/simple/mysql-python/
    Downloading https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip#sha256=811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74
    Best match: MySQL-python 1.2.5
    Processing MySQL-python-1.2.5.zip
    Writing C:\Users\Suhasm\AppData\Local\Temp\easy_install-uciw2yjf\MySQL-python-1.2.5\setup.cfg
    Running MySQL-python-1.2.5\setup.py -q bdist_egg --dist-dir C:\Users\Suhasm\AppData\Local\Temp\easy_install-uciw2yjf\MySQL-python-1.2.5\egg-dist-tmp-4jbv49w6
    _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\suhasm\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\suhasm\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: '<': signed/unsigned mismatch
       Creating library build\temp.win32-3.6\Release\_mysql.cp36-win32.lib and object build\temp.win32-3.6\Release\_mysql.cp36-win32.exp
    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: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1120

是的,我通过下载二进制文件修复了它

pip install --only-binary :all: mysqlclient

您是否尝试过pip install mysqlclient?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM