python - pip intall pytest 产生 NewConnectionErrors
问题描述
我在远程服务器上(需要企业 VPN 访问才能通过 ssh 连接到远程服务器)。我在 conda 环境(在我的情况下为 pytorch)中工作,需要安装 pytest。我尝试了该命令pip3 install pytest
,但不断收到以下错误:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f7d39a10250>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/pytest/
我在Python pip中看到了一个相关问题, 在安装库时引发了 NewConnectionError,并按照接受的答案建议添加nameserver 8.8.8.8
到 /etc/resolv.conf 文件中,但它没有解决我的问题。
有人可以建议吗?
我怀疑这与我的 VPN 有关。我无法关闭 VPN,否则它会断开我与正在处理的远程服务器的连接。
解决方案
推荐阅读
- powershell - Install-PackageProvider 找不到 NuGet 提供程序
- javascript - 如何用新的替换 json 对象的属性
- python - 在一张图表上绘制两个图后,没有发现带有标签的句柄出现图例错误
- batch-file - 递归 Del 命令不会删除所有匹配的通配符 glob
- python - X 轴未在我有另一个重叠图的数据框图中正确共享
- r - 如何在没有 URL 的情况下单击按钮下载 CSV
- python - Robot Framework 的 Press Keys 功能是否允许同时按下几个键,然后一个接一个地单独按下几个键?
- php - 提交带有多个复选框的单个表单
- r - 按组查找高于和低于某个日期的最接近的值
- tsql - 需要事实表结构指导 - TSQL