python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
30.4k stars 2.23k forks source link

Poetry hangs on arch(manjaro) with python3.9 #4726

Closed yairfrid closed 1 year ago

yairfrid commented 2 years ago

Issue

after running pip install poetry, tried creating a new package, but poetry seems to hang. this also reproduces on the poetry project on the master branch

example:

➜  tmp.9guve4mRZv ls
➜  tmp.9guve4mRZv poetry new example2
Created package example2 in example2
➜  tmp.9guve4mRZv cd example2
➜  example2 ls
example2  pyproject.toml  README.rst  tests
➜  example2 poetry add requests
Creating virtualenv example2-nYkGWW6L-py3.9 in /home/yairf/.cache/pypoetry/virtualenvs

Rerunning that command had no results

But on the poetry project:

➜  poetry git:(master) poetry install
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.

Package operations: 56 installs, 0 updates, 0 removals

  • Installing pycparser (2.20): Pending...

This state does not change for a while(waited 10 minutes+) adding -vvv did not give any meaningful output

the poetry install example was fixed by disabling the experimental installer

poetry config experimental.new-installer false

although installation is very slow

possible duplication of #3352

My pip freeze(not pipx installed):

apparmor==3.0.1
appdirs==1.4.4
application-utility==1.3.2
arandr==0.1.10
astroid==2.7.3
backports.entry-points-selectable==1.1.0
btrfsutil==5.13.1
CacheControl==0.12.6
cachy==0.3.0
ceph==1.0.0
ceph-volume==1.0.0
cephfs==2.0.0
cephfs-shell==0.0.1
certifi==2020.12.5
cffi==1.14.6
chardet==4.0.0
cleo==0.8.1
clikit==0.6.2
colorama==0.4.4
contextlib2==0.6.0.post1
crashtest==0.3.1
cryptography==3.4.7
cupshelpers==1.0
Cython==0.29.24
distlib==0.3.2
distro==1.5.0
dnspython==1.16.0
docopt==0.6.2
filelock==3.0.12
greenlet==1.1.1
html5lib==1.1
idna==3.2
isc==2.0
isort==5.9.3
jedi==0.18.0
jeepney==0.7.1
Jinja2==3.0.1
keyring==21.8.0
keyutils==0.6
lazy-object-proxy==1.6.0
LibAppArmor==3.0.1
libtorrent===1.2.14-build-libtorrent-rasterbar-src-libtorrent-rasterbar-1.2.14-bindings-python
lightdm-gtk-greeter-settings==1.2.2
lockfile==0.12.2
louis==3.18.0
Markdown==3.3.4
MarkupSafe==2.0.1
mccabe==0.6.1
more-itertools==8.8.0
msgpack==1.0.2
netsnmp-python==1.0a1
npyscreen==4.10.5
ordered-set==4.0.2
packaging==20.9
pacman-mirrors==4.21.5
parso==0.8.2
pastel==0.2.1
pbr==5.6.0
pep517==0.11.0
pexpect==4.8.0
Pillow==8.3.1
pkginfo==1.7.1
platformdirs==2.3.0
ply==3.11
poetry==1.1.11
poetry-core==1.0.7
progress==1.5
ptyprocess==0.7.0
pulsemixer==1.5.1
pycairo==1.20.0
pycparser==2.20
pycups==2.0.1
pycurl==7.43.0.6
PyGObject==3.40.1
pylev==1.4.0
pylint==2.10.2
pynvim==0.4.3
pyOpenSSL==20.0.1
pyparsing==2.4.7
PyQt5==5.15.4
PyQt5-sip==12.9.0
pysmbc==1.0.23
PyYAML==5.4.1
rados==2.0.0
rbd==2.0.0
reportlab==3.5.68
requests==2.26.0
requests-toolbelt==0.9.1
resolvelib==0.5.5
retrying==1.3.3
rgw==2.0.0
SecretStorage==3.3.1
shellingham==1.4.0
six==1.16.0
stevedore==3.4.0
team==1.0
toml==0.10.2
tomli==1.2.1
tomlkit==0.7.2
udiskie==2.3.3
urllib3==1.26.6
virtualenv==20.7.2
virtualenv-clone==0.5.7
virtualenvwrapper==4.8.4
webencodings==0.5.1
wrapt==1.12.1
yapf==0.31.0
cgarciae commented 2 years ago

I cant use poetry :cry: it gets stuck here forever:

Finding the necessary packages for the current system

Package operations: 12 installs, 0 updates, 0 removals

  • Installing typing-extensions (3.10.0.2)
  • Installing zipp (3.6.0)
  • Installing importlib-metadata (4.8.2)
  • Installing pyparsing (2.4.7): Pending...
cgarciae commented 2 years ago

Tried in Python 3.8.11 and 3.7.11

mattsta commented 2 years ago

After upgrading poetry to latest version (previous version was maybe a year old?), I'm also seeing current poetry install hanging forever on some dependency configurations, but poetry update completes fine.

$ poetry -V
Poetry version 1.1.11
floatingpurr commented 2 years ago

Did anybody find a solution for this? I'm stuck with a similar problem (https://github.com/python-poetry/poetry/issues/4855)

wereii commented 2 years ago

After installing and trying out poetry this started to happen to me too but with python310 (5.16.0-1-MANJARO).

Though installing a package thru pip gets stuck on accessing pypi.org for definitely longer time then normally.

EDIT: Caused by faulty ipv6 connection, resolved by setting Ignore in IPv6 Settings in my wifi connection and reconnecting. Poetry now no longer hangs.

neersighted commented 1 year ago

I can't reproduce the original, and all the comments are only tangentially related. This looks like the usual suspects: IPv6/networking issues or a busted cache. Try poetry cache clear --all . and rm -rf $(poetry cache-dir)/artifacts to blow away your caches and start over if you run into a hang. The two underlying issues that could cause the corrupted caches are resolved in the upcoming 1.3 branch.

pHiney commented 1 year ago

I got this today. openSuSE 15.4, python 3.10 in a VM using VMware Player and network was set to NAT. Disabled IP v6 as per https://www.suse.com/support/kb/doc/?id=000016980 and 10.2.2 of https://wiki.archlinux.org/title/IPv6 rebooted and poetry install works now.

perhaps a timeout on network connections ?

andyantrim commented 11 months ago

Ran into this again recently on latest arch, hung on keychain until I disabled ipv6 and restarted networking fixed it. This was a fresh installation with no cache files.

Poetry (version 1.5.1)

github-actions[bot] commented 4 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.