为了学习GitHub的开源项目nha,并在autodl上租服务器跑。执行pip install -e .搭建环境出现以下报错:
error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.
fatal: the remote end hung up unexpectedly
error: subprocess-exited-with-error
× git clone --filter=blob:none --quiet https://github.com/wl2776/python-cpbd.git /tmp/pip-install-f62z1t20/cpbd_7038c430150a4e0282ce1a72306c9749 did not run successfully.
│ exit code: 128
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error× git clone --filter=blob:none --quiet https://github.com/wl2776/python-cpbd.git /tmp/pip-install-f62z1t20/cpbd_7038c430150a4e0282ce1a72306c9749 did not run successfully.
│ exit code: 128
╰─> See above for output.note: This error originates from a subprocess, and is likely not a problem with pip.
出错的原因是:
1. 网络问题 2. 使用或者关闭代理 3. 权限问题:私有仓库需要身份验证
查看项目下setup.py代码,根据报错中的git网址,找到出错的地方,如图:
这样确定了是在通过git克隆https://github.com/wl2776/python-cpbd.git时出现了问题,通过浏览器访问该网页,发现访问成功,因此可以确定是网络问题导致报错。
解决办法:尝试手动克隆,运行命令:
git clone https://github.com/wl2776/python-cpbd.git
如有需要,再进入克隆的仓库目录 cd python-cpbd,根据仓库要求安装依赖(在仓库文档中寻找)。