zoukankan      html  css  js  c++  java
  • pip install时报错

    因为需要mysqlclient这个模块,但是在pip的时候报错

    Collecting mysqlclient
      Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
    Building wheels for collected packages: mysqlclient
      Building wheel for mysqlclient (setup.py) ... error
      ERROR: Complete output from command 'c:userslibo3appdatalocalprogramspythonpython37-32python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\libo3\AppData\Local\Temp\pip-install-dx_ukroi\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"' '"'"', '"'"' '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:Userslibo3AppDataLocalTemppip-wheel-rh1vf72j' --python-tag cp37:
      ERROR: running bdist_wheel
      running build
      running build_py
      creating build
      creating buildlib.win32-3.7
      creating buildlib.win32-3.7MySQLdb
      copying MySQLdb\__init__.py -> buildlib.win32-3.7MySQLdb
      copying MySQLdb\_exceptions.py -> buildlib.win32-3.7MySQLdb
      copying MySQLdbcompat.py -> buildlib.win32-3.7MySQLdb
      copying MySQLdbconnections.py -> buildlib.win32-3.7MySQLdb
      copying MySQLdbconverters.py -> buildlib.win32-3.7MySQLdb
      copying MySQLdbcursors.py -> buildlib.win32-3.7MySQLdb
      copying MySQLdb elease.py -> buildlib.win32-3.7MySQLdb
      copying MySQLdb imes.py -> buildlib.win32-3.7MySQLdb
      creating buildlib.win32-3.7MySQLdbconstants
      copying MySQLdbconstants\__init__.py -> buildlib.win32-3.7MySQLdbconstants
      copying MySQLdbconstantsCLIENT.py -> buildlib.win32-3.7MySQLdbconstants
      copying MySQLdbconstantsCR.py -> buildlib.win32-3.7MySQLdbconstants
      copying MySQLdbconstantsER.py -> buildlib.win32-3.7MySQLdbconstants
      copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win32-3.7MySQLdbconstants
      copying MySQLdbconstantsFLAG.py -> buildlib.win32-3.7MySQLdbconstants
      running build_ext
      building 'MySQLdb._mysql' extension
      error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
      ----------------------------------------
      ERROR: Failed building wheel for mysqlclient
      Running setup.py clean for mysqlclient
    Failed to build mysqlclient
    Installing collected packages: mysqlclient
      Running setup.py install for mysqlclient ... error
        ERROR: Complete output from command 'c:userslibo3appdatalocalprogramspythonpython37-32python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\libo3\AppData\Local\Temp\pip-install-dx_ukroi\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"' '"'"', '"'"' '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Userslibo3AppDataLocalTemppip-record-etl1tmtlinstall-record.txt' --single-version-externally-managed --compile:
        ERROR: running install
        running build
        running build_py
        creating build
        creating buildlib.win32-3.7
        creating buildlib.win32-3.7MySQLdb
        copying MySQLdb\__init__.py -> buildlib.win32-3.7MySQLdb
        copying MySQLdb\_exceptions.py -> buildlib.win32-3.7MySQLdb
        copying MySQLdbcompat.py -> buildlib.win32-3.7MySQLdb
        copying MySQLdbconnections.py -> buildlib.win32-3.7MySQLdb
        copying MySQLdbconverters.py -> buildlib.win32-3.7MySQLdb
        copying MySQLdbcursors.py -> buildlib.win32-3.7MySQLdb
        copying MySQLdb elease.py -> buildlib.win32-3.7MySQLdb
        copying MySQLdb imes.py -> buildlib.win32-3.7MySQLdb
        creating buildlib.win32-3.7MySQLdbconstants
        copying MySQLdbconstants\__init__.py -> buildlib.win32-3.7MySQLdbconstants
        copying MySQLdbconstantsCLIENT.py -> buildlib.win32-3.7MySQLdbconstants
        copying MySQLdbconstantsCR.py -> buildlib.win32-3.7MySQLdbconstants
        copying MySQLdbconstantsER.py -> buildlib.win32-3.7MySQLdbconstants
        copying MySQLdbconstantsFIELD_TYPE.py -> buildlib.win32-3.7MySQLdbconstants
        copying MySQLdbconstantsFLAG.py -> buildlib.win32-3.7MySQLdbconstants
        running build_ext
        building 'MySQLdb._mysql' extension
        error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
        ----------------------------------------
    ERROR: Command "'c:userslibo3appdatalocalprogramspythonpython37-32python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\libo3\AppData\Local\Temp\pip-install-dx_ukroi\mysqlclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"' '"'"', '"'"' '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:Userslibo3AppDataLocalTemppip-record-etl1tmtlinstall-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:Userslibo3AppDataLocalTemppip-install-dx_ukroimysqlclient

    如此一长串的错误,看的我头皮发麻,最后在网上看到别人也有类似错误,就Mark一下

    首先先去这个网站https://www.lfd.uci.edu/~gohlke/pythonlibs/,找到要下的东西对应的版本,然后再cmd里打开下载的目录,pip install 你下载的文件就OK了

  • 相关阅读:
    使用百度地图API服务中的问题汇总
    C#中字符串格式化string.Forma中需要使用t转义字符的情况处理
    C#HTTP网络编程的一般流程
    [转]C#的二进制文件操作及关于Encoding类与汉字编码转换的问题
    C# .Net FrameWork3.5中异步HTTP请求时,由于安全协议的问题System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)方法抛出“基础连接已经关闭: 发送时发生错误”的解决办法
    [Android Pro] Android P版本 新功能介绍和兼容性处理(三)Android Studio 3.0 ~ 3.2 其他特性
    [Android P] Android P版本 新功能介绍和兼容性处理(一)
    [Android] Implementation vs API dependency
    [Nginx] Nginx 配置location总结
    [Web 前端 ] 还在用浮动吗?CSS flex布局你了解多少?
  • 原文地址:https://www.cnblogs.com/afei123/p/11240182.html
Copyright © 2011-2022 走看看