error: <urlopen error [Errno 104] Connection reset by peer> Failed building wheel for shellcheck-py

当执行

pip install paddlehub

在终端安装执行后出现以下错误内容:

Collecting shellcheck-py
  Using cached shellcheck_py-0.7.2.1.tar.gz (4.2 kB)
Building wheels for collected packages: shellcheck-py
  Building wheel for shellcheck-py (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dy984vib/shellcheck-py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dy984vib/shellcheck-py/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 /tmp/pip-wheel-fkat704k
       cwd: /tmp/pip-install-dy984vib/shellcheck-py/
  Complete output (4 lines):
  running bdist_wheel
  running build
  running fetch_binaries
  error: <urlopen error [Errno 104] Connection reset by peer>
  ----------------------------------------
  ERROR: Failed building wheel for shellcheck-py
  Running setup.py clean for shellcheck-py
Failed to build shellcheck-py
Installing collected packages: shellcheck-py
    Running setup.py install for shellcheck-py ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dy984vib/shellcheck-py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dy984vib/shellcheck-py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-walxj7n6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/shellcheck-py
         cwd: /tmp/pip-install-dy984vib/shellcheck-py/
    Complete output (4 lines):
    running install
    running build
    running fetch_binaries
    error: <urlopen error [Errno 104] Connection reset by peer>
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dy984vib/shellcheck-py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dy984vib/shellcheck-py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-walxj7n6/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/shellcheck-py Check the logs for full command output.

此时登入链接 需要下载相应库的whl:

如果下载tar.gz或者whl仍然出错时(tar.gz仍然报以上错误,whl则出现平台不支持问题):

需要进入python查询pip所支持的whl(此查询法只适用于pip=20.0.1,若更低版本则需要更换查询方式) :

import pip._internal.pep425tags
print(pip._internal.pep425tags.get_supported())

如果没有支持的,更新pip之后再安装:

pip install --upgrade pip

pip install shellcheck_py-0.7.2.1-py2.py3-none-manylinux1_x86_64.whl <your whl>

pip install paddlehub

安装成功:

进入python后可以正常import,即为安装成功:

import paddlehub
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值