Whenever I try to add a new package with poetry (using poetry add <package_name>), I get the following connection error:
ConnectionError
('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
at ~/.poetry/lib/poetry/_vendor/py3.8/requests/adapters.py:498 in send
494│ low_conn.close()
495│ raise
496│
497│ except (ProtocolError, socket.error) as err:
→ 498│ raise ConnectionError(err, request=request)
499│
500│ except MaxRetryError as e:
501│ if isinstance(e.reason, ConnectTimeoutError):
502│ # TODO: Remove this in 3.0.0: see #2811
Things I have already tried:
- Different packages (e.g.: rsa, jupyter). This happens with some of PyPi's most popular ones, as well.
- Running the command in debugging mode, which didn't yield anything of use other than this error.
- Installing without poetry, via pip (which worked).
- Trying different IDEs (Pycharm's terminal & Jupyter). This happened with both.
Environment: I am using poetry version 1.1.12, with WSL-2.