诗歌安装-ConnectionError |无法建立新连接:[Errno 101] 网络无法访问'

poetry install - ConnectionError | Failed to establish a new connection: [Errno 101] Network is unreachable'

我正在使用 Poetry version 1.1.7

运行 poetry install 产生此错误。

这可以通过 bash 解决吗?还是这明显与我的网络有关?注意:Internet 连接在浏览器中完全正常。

me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry install
Updating dependencies
Resolving dependencies... (225.5s)

  ConnectionError

  HTTPSConnectionPool(host='pkgs.dev.azure.com', port=443): Max retries exceeded with url: <CENSORED> (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f53950c3ee0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

  at ~/.poetry/lib/poetry/_vendor/py3.8/requests/adapters.py:516 in send
      512│             if isinstance(e.reason, _SSLError):
      513│                 # This branch is for urllib3 v1.22 and later.
      514│                 raise SSLError(e, request=request)
      515│ 
    → 516│             raise ConnectionError(e, request=request)
      517│ 
      518│         except ClosedPoolError as e:
      519│             raise ConnectionError(e, request=request)
      520│ 

将 URL 粘贴到我的浏览器时抛出 401 Unauthorized Error

我做到了:

  • poetry self update 1.0.10
  • poetry install

Terminal 现在正在给我安装,这是应该的。

me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry self update 1.0.10
Updating to 1.0.10
 - Downloading poetry-1.0.10-linux.tar.gz 100%

Poetry (1.0.10) is installed now. Great!
me@LAPTOP-G1DAPU88:~/.ssh/workers-python/workers/CompositeKey/CompositeKey$ poetry install
Updating dependencies
Resolving dependencies... (101.5s)

Writing lock file


Package operations: 167 installs, 0 updates, 0 removals

  - Installing six (1.16.0)
  ...