首页 > 解决方案 > 诗歌安装- ConnectionError | 无法建立新连接:[Errno 101] Network is unreachable' [已解决]

问题描述

我正在使用Poetry version 1.1.7.

运行会poetry install产生此错误。

这可以通过 bash 解决还是明确与我的网络有关?注意:互联网连接在浏览器中非常好。

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 错误。

标签: python-3.xconnectionconnection-poolingurllib3python-poetry

解决方案


我做了:

  • poetry self update 1.0.10
  • poetry install

终端现在正在给我安装,因为它应该。

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)
  ...

推荐阅读