-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] PIP3 Install hangs indefinitely #2776
Comments
I can see how this may be a side-effect of #2775 — the new pip resolver (resolvelib) supports backtracking. It means that if a build fails, it'll try to build an older version of the dependency. But if there are dists that have It's just a speculation, though. |
I tried reproducing this with w/ v58.0.3 in the venv under Python 3.9 and I see that my hunch about pip's backtracking was right. It's attempting to download a huge matrix of versions of transitive dependencies and dismisses some of the sdists because of failing to build them (when those projects don't ship wheels). One of the errors I saw in the log was a problem with Flask-OpenID (see pallets-eco/flask-openid#60): ERROR: Command errored out with exit status 1:
command: ~/src/experiments/setuptools-v58.0.3/venv-s58.0.3/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6ihoqio_/flask-openid_2d8e823c8686418988ff2368e10ca4ea/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6ihoqio_/flask-openid_2d8e823c8686418988ff2368e10ca4ea/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-utc73wga
cwd: /tmp/pip-install-6ihoqio_/flask-openid_2d8e823c8686418988ff2368e10ca4ea/
Complete output (1 lines):
error in Flask-OpenID setup command: use_2to3 is invalid.
---------------------------------------- Another example of a discarded version was not a hard failure but a warning about the metadata mismatch for the WARNING: Requested dill<0.4,>=0.2.2 from https://files.pythonhosted.org/packages/3e/ad/31932a4e2804897e6fd2f946d53df51dd9b4aa55e152b5404395d00354d1/dill-0.3.1.tar.gz#sha256=d3ddddf2806a7bc9858b20c02dc174396795545e9d62f243b34481fd26eb3e2c (from apache-airflow==1.10.11), but installing version 0.3.1.dev0
WARNING: Discarding https://files.pythonhosted.org/packages/3e/ad/31932a4e2804897e6fd2f946d53df51dd9b4aa55e152b5404395d00354d1/dill-0.3.1.tar.gz#sha256=d3ddddf2806a7bc9858b20c02dc174396795545e9d62f243b34481fd26eb3e2c (from https://pypi.org/simple/dill/) (requires-python:>=2.6, !=3.0.*). Requested dill<0.4,>=0.2.2 from https://files.pythonhosted.org/packages/3e/ad/31932a4e2804897e6fd2f946d53df51dd9b4aa55e152b5404395d00354d1/dill-0.3.1.tar.gz#sha256=d3ddddf2806a7bc9858b20c02dc174396795545e9d62f243b34481fd26eb3e2c (from apache-airflow==1.10.11) has inconsistent version: filename has '0.3.1', but metadata has '0.3.1.dev0' I've also confirmed that with |
yep even 58.0.0 works just fine but I saw no improvement with 58.0.3 |
I am getting an error installing pyhash. It is using setup from setuptools and passing parameter use_2to3=True. |
The reason 58.0.0 worked fine was because it allowed the project to build and install even though the code was likely invalid. |
Oh, interesting.
The easiest fix for this would be for pyhash to release a Python 3 wheel in PyPI of the latest release. It should also consider dropping use of |
I filed flier/pyfasthash#49. I don't believe there's anything more to do here. Sorry for the inconvenience. |
Hey @mgorsk1 (and everyone here) -> we solved the issue yesterday for Airflow 2. Together with @jaraco we are now both maintainers of Flask-OpenID, we released https://pypi.org/project/Flask-OpenID/1.3.0/ and updated all the constraints for all released Airflow 2 versions. Unfortunately Airflow 1.10 is not maintained any more, so we will not update constraints there. However, there is an easy solution if you are still using using Airflow 1.10 - just copy the constraints to your own git repository and make the change there. The change is super-easy, just change the constraint for Flask-OpenID to 1.3.0 (from 1.2.5). When you use your own constraints file, this will fix installation problems for you. More you actually won't even need setuptools there for FlaskOpenID, because we relased .whl version of it. Example commit (this one switches from our tactical solution which implemented before I became a maintainers of Flask OpenID). apache/airflow@be590f4 Big thanks to @mitsuhiko for quick reaction and willingness to help us ! |
Thanks @potiuk for info, indeed we will just bump airflow dep as we are at 2.1.3 anyways and looks like we just forgot to update unit tests deps 😅 |
setuptools version
setuptools==58.0.2
Python version
Python 3.7
OS
CentOS Linux 7 (in Docker)
Additional environment information
Running code in gitlab ci/cd docker runner. Gitlab version 14.0.1.
Description
We run pip3 install --upgrade setuptools pip and after that pip3 install -r requirements-dev.txt with following content:
Until yesterday this step finished in under 2 minutes with setuptools==58.0.0. Today newer version of setuptools has been pulled which made step timeout after 1hr. The job is stuck on pip3 install step with croniter package being consistently the last one (stuck for ~55 minutes) before timeout happens.
Expected behavior
pip3 install -r requirements-dev.txt finishes ok
How to Reproduce
run pip3 install --upgrade setuptools pip and after that pip3 install -r requirements-dev.txt with following content:
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: