尝试安装`docling`时出错“正在重试(重试(总计= 4,....”

问题描述 投票:0回答:1

编辑:我想我已经弄清楚了。当我跑步时

pip config debug
我得到:

env_var:
env:
global:
  /Library/Application Support/pip/pip.conf, exists: False
site:
  /opt/anaconda3/pip.conf, exists: False
user:
  /Users/julio/.pip/pip.conf, exists: False
  /Users/julio/.config/pip/pip.conf, exists: False
 ~    

我这边很可能需要一个网络配置,因为以下不起作用:

import requests

response = requests.get("https://pypi.org/simple/")
response.raise_for_status()

原帖:

pip install docling                                                                                 1 ✘  ollama_llama32_11b   base   system  
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 0x1073868a0>: Failed to establish a new connection: [Errno 65] No route to host')': /simple/docling/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x10693f260>: Failed to establish a new connection: [Errno 65] No route to host')': /simple/docling/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x1073ed460>: Failed to establish a new connection: [Errno 65] No route to host')': /simple/docling/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x107544230>: Failed to establish a new connection: [Errno 65] No route to host')': /simple/docling/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x107544440>: Failed to establish a new connection: [Errno 65] No route to host')': /simple/docling/
ERROR: Could not find a version that satisfies the requirement docling (from versions: none)
ERROR: No matching distribution found for docling

关于堆栈溢出的最相似的问题无法修复它。

我的

/etc/resolv.conf
看起来像这样。

#
# macOS Notice
#
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
#
# To view the DNS configuration used by this system, use:
#   scutil --dns
#
# SEE ALSO
#   dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
search home
nameserver 8.8.8.8
nameserver 8.8.4.4

这是我机器的 DNS 和代理系统设置:

enter image description here enter image description here

我尝试使用不同的 wifi 网络,但也没有任何区别

我注意到的一件奇怪的事情是在我的 Little Snitch 上,当我运行命令时,这些规则会出现:

enter image description here

但即使我尝试将它们更改为“允许”,仍然会出现相同的安装错误。

python macos pypi
1个回答
0
投票

出于某种原因,在我删除 Little Snitch 后,它开始起作用。它可能阻止了一些网络调用

© www.soinside.com 2019 - 2024. All rights reserved.