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了

  • 相关阅读:
    Groovy Urlencode编码
    PowerShell导入自定义公共函数
    Groovy获取对象类型、属性
    adb名称操作模拟器
    《坚不可摧》——乔布斯演讲
    马拉松节奏跑(转载)
    马拉松配速
    什么是思考力三要素?(转载)
    Python解析JSON为实体
    excel宏的用法
  • 原文地址:https://www.cnblogs.com/afei123/p/11240182.html
Copyright © 2011-2022 走看看