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:\users\libo3\appdata\local\programs\python\python37-32\python.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(‘"‘"‘\r\n‘"‘"‘, ‘"‘"‘\n‘"‘"‘);f.close();exec(compile(code, __file__, ‘"‘"‘exec‘"‘"‘))‘ bdist_wheel -d ‘C:\Users\libo3\AppData\Local\Temp\pip-wheel-rh1vf72j‘ --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-3.7
  creating build\lib.win32-3.7\MySQLdb
  copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
  creating build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants
  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:\users\libo3\appdata\local\programs\python\python37-32\python.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(‘"‘"‘\r\n‘"‘"‘, ‘"‘"‘\n‘"‘"‘);f.close();exec(compile(code, __file__, ‘"‘"‘exec‘"‘"‘))‘ install --record ‘C:\Users\libo3\AppData\Local\Temp\pip-record-etl1tmtl\install-record.txt‘ --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    creating build\lib.win32-3.7\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
    creating build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants
    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:\users\libo3\appdata\local\programs\python\python37-32\python.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(‘"‘"‘\r\n‘"‘"‘, ‘"‘"‘\n‘"‘"‘);f.close();exec(compile(code, __file__, ‘"‘"‘exec‘"‘"‘))‘ install --record ‘C:\Users\libo3\AppData\Local\Temp\pip-record-etl1tmtl\install-record.txt‘ --single-version-externally-managed --compile" failed with error code 1 in C:\Users\libo3\AppData\Local\Temp\pip-install-dx_ukroi\mysqlclient\

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

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

原文地址:https://www.cnblogs.com/afei123/p/11240182.html

时间: 2024-10-10 05:45:24

pip install时报错的相关文章

(转)Linux安装SwfTools-0.9.2安装事,在执行make install时报错

系统:CentOS6.5 安装SwfTools-0.9.2的时候,在执行make install时报错, rm -f /usr/local/share/swftools/swfs/default_viewer.swf -o -L /usr/local/share/swftools/swfs/default_viewer.swfrm:无效选项 -- o请尝试执行"rm --help"来获取更多信息.make[1]: *** [install] 错误 1make[1]: Leaving d

pip install报错Can't roll back cryptography; was not uninstalled

当使用pip install或者pip install --upgrade报错 Can't roll back cryptography; was not uninstalled 可以进行以下的尝试: sudo apt-get install libssl-dev libffi-dev 之后再继续php install pip install报错Can't roll back cryptography; was not uninstalled

python2.7.6 , setuptools pip install, 报错:UnicodeDecodeError:'ascii' codec can't decode byte

今天折腾了一天,安装pyspider,由于依赖包众多,而且搜索到所有信息多是在linux平台和mac平台下的安装教程.可怜我试了n多版本,一直不成功. 最后发现有人说python的版本,不能低于2.7.6,否则pycurl无法安装成功,一查我的是2.7.2. 好吧,卸载,重新安装python2.7.6. 似乎安装后,能够顺利安装pycurl了,但是easy_install 报错信息与编码相关: 在网上搜索找到解决方案:http://www.360doc.com/content/14/0508/0

spring boot maven install时报错 Error creating bean with name 'serverEndpointExporter'

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverEndpointExporter' defined in class path resource [com/pky/testmybatis/config/WebSocketConfig.class]: Invocation of init method failed; nested exception is j

Mac OS X El Capitan (10.11) sudo pip install 报错 “OSError: [Errno 1] Operation not permitted”

由于 OS X El Capitan 采用了 System Integrity Protection 保护技术,导致 sudo pip install 安装python包时会产生报错: 1 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs 2 makedirs(head, mode) 3 File "/System

pip install 报错

问题描述,在使用pip安装django相关软件包时,提示错误如下: [[email protected] install]# pip install django==1.6 Downloading/unpacking django==1.6 Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement django==1.6

pip install 报错 Could not fetch URL

Could not fetch URL https://pypi.python.org/simple/xxx/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping Could not find a version that satisfies the requirement xx

maven install时报错 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)

今天在一个maven项目上执行maven install命令的时候一直报错,错误信息如下: [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.16

npm install时报错 npm ERR!Windows_NT 6.1.7601

解决办法:先设置代理为空 npm config set proxy null, 然后再npm install cnpm -g --registry=https://registry.npm.taobao.org!