• 安装mysqlclient==1.3.13出错:_mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory


    问题:


    ERROR: Command errored out with exit status 1: command: 'C:ProgramDataanaconda3envsflask_learnpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\sewen\AppData\Local\Temp\pip-install-nyi1 a5bp\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\sewen\AppData\Local\Temp\pip-install-nyi1a5bp\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file __);code=f.read().replace('"'"' '"'"', '"'"' '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UserssewenAppDataLocalTemppip-record-e8inmf7e install-record.txt' --single-version-externally-managed --compile --install-headers 'C:ProgramDataanaconda3envsflask_learnIncludemysqlclient' cwd: C:UserssewenAppDataLocalTemppip-install-nyi1a5bpmysqlclient Complete output (30 lines): running install running build running build_py creating build creating buildlib.win-amd64-3.6 copying _mysql_exceptions.py -> buildlib.win-amd64-3.6 creating buildlib.win-amd64-3.6MySQLdb copying MySQLdb\__init__.py -> buildlib.win-amd64-3.6MySQLdb copying MySQLdbcompat.py -> buildlib.win-amd64-3.6MySQLdb copying MySQLdbconnections.py -> buildlib.win-amd64-3.6MySQLdb copying MySQLdbconverters.py -> buildlib.win-amd64-3.6MySQLdb copying MySQLdbcursors.py -> buildlib.win-amd64-3.6MySQLdb copying MySQLdb elease.py -> buildlib.win-amd64-3.6MySQLdb copying MySQLdb imes.py -> buildlib.win-amd64-3.6MySQLdb creating buildlib.win-amd64-3.6MySQLdbconstants copying MySQLdbconstants\__init__.py -> buildlib.win-amd64-3.6MySQLdbconstants copying MySQLdbconstantsCLIENT.py -> buildlib.win-amd64-3.6MySQLdbconstants copying MySQLdbconstantsCR.py -> buildlib.win-amd64-3.6MySQLdbconstants copying MySQLdbconstantsER.py -> buildlib.win-amd64-3.6MySQLdbconstants copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win-amd64-3.6MySQLdbconstants copying MySQLdbconstantsFLAG.py -> buildlib.win-amd64-3.6MySQLdbconstants copying MySQLdbconstantsREFRESH.py -> buildlib.win-amd64-3.6MySQLdbconstants running build_ext building '_mysql' extension creating build emp.win-amd64-3.6 creating build emp.win-amd64-3.6Release C:Program Files (x86)Microsoft Visual Studio 14.0VCBINx86_amd64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,3,13,'final',0) -D__version__=1.3.13 "-IC:Program Files (x86)MySQLMySQL Connector C 6.1include" -IC:ProgramDataanaconda3envsflask_learninclude -IC:ProgramDataanaconda3envsflask_learninclude "-IC:Program Files (x86)Micros oft Visual Studio 14.0VCINCLUDE" "-IC:Program Files (x86)Windows Kits10include10.0.10240.0ucrt" "-IC:Program Files (x86)Windows Kits8.1includeshared" "-IC:Program Files (x 86)Windows Kits8.1includeum" "-IC:Program Files (x86)Windows Kits8.1includewinrt" /Tc_mysql.c /Fobuild emp.win-amd64-3.6Release\_mysql.obj /Zl _mysql.c _mysql.c(29): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2 ---------------------------------------- Rolling back uninstall of mysqlclient Moving to c:programdataanaconda3envsflask_learnlibsite-packagesmysqlclient-2.0.1.dist-info from c:programdataanaconda3envsflask_learnlibsite-packages~ysqlclient-2.0.1.dist-info Moving to c:programdataanaconda3envsflask_learnlibsite-packagesmysqldb from c:programdataanaconda3envsflask_learnlibsite-packages~ysqldb ERROR: Command errored out with exit status 1: 'C:ProgramDataanaconda3envsflask_learnpython.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\sewen\AppDa ta\Local\Temp\pip-install-nyi1a5bp\mysqlclient\setup.py'"'"'; __file__='"'"'C:\Users\sewen\AppData\Local\Temp\pip-install-nyi1a5bp\mysqlclient\setup.py'"'"';f=getattr(token ize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"' '"'"', '"'"' '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UserssewenAppDat aLocalTemppip-record-e8inmf7einstall-record.txt' --single-version-externally-managed --compile --install-headers 'C:ProgramDataanaconda3envsflask_learnIncludemysqlclient' Chec k the logs for full command output.

     搜索初步判断是因为mysqlclient==1.3.13不支持windows下python3.6环境,升级到了1.4.6版本,更新后可以正常运行;

  • 相关阅读:
    索引与搜索框架Lucene
    AutoResetEvent和ManualResetEvent的理解
    hadoop mapreduce 过程详解
    使用Visual Studio进行代码度量
    MethodImplAttribute 类和 SynchronizationAttribute 类
    开发定时服务应用
    DispatcherTimer与Dispatcher小小应用
    WCF问题
    玩转博客园的心路总结
    工作中碰到的一些东西【弹出窗口】【拖放】【异步文件上传】
  • 原文地址:https://www.cnblogs.com/sewen-H/p/13554691.html
Copyright © 2020-2023  润新知