Skip to content
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

pip install killed due to excessive memory consumption (due to new pip resolver) #7768

Closed
chrisjsewell opened this issue Dec 18, 2020 · 15 comments

Comments

@chrisjsewell
Copy link
Contributor

chrisjsewell commented Dec 18, 2020

Details

I have opened this issue on pip itself (pypa/pip#9318) but I'm opening it here as well, to track its progress, since it is only on RTD that I have encountered it, and I'm sure I will not be the only RTD user affected by this.
Also perhaps there may be an RTD specific aspect to the fix.

Example RTD build: https://readthedocs.org/projects/markdown-it-py/builds/12576084/

Collecting attrs<21,>=19
  Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting mdit-py-plugins~=0.2.1
  Downloading mdit_py_plugins-0.2.1-py3-none-any.whl (38 kB)
Collecting myst-nb~=0.10.0
  Downloading myst_nb-0.10.1-py3-none-any.whl (36 kB)
Collecting docutils>=0.15
  Downloading docutils-0.16-py2.py3-none-any.whl (548 kB)
Collecting ipywidgets<8,>=7.0.0
  Downloading ipywidgets-7.5.1-py2.py3-none-any.whl (121 kB)
Collecting ipykernel>=4.5.1
  Downloading ipykernel-5.4.2-py3-none-any.whl (119 kB)
Collecting ipython
  Downloading ipython-7.19.0-py3-none-any.whl (784 kB)
Requirement already satisfied: pygments in /home/docs/checkouts/readthedocs.org/user_builds/markdown-it-py/envs/98/lib/python3.7/site-packages (from ipython->myst-nb~=0.10.0->markdown-it-py==0.6.0) (2.7.3)
Requirement already satisfied: setuptools>=18.5 in /home/docs/checkouts/readthedocs.org/user_builds/markdown-it-py/envs/98/lib/python3.7/site-packages (from ipython->myst-nb~=0.10.0->markdown-it-py==0.6.0) (41.0.1)
Collecting jedi>=0.10
  Downloading jedi-0.17.2-py2.py3-none-any.whl (1.4 MB)
Collecting jupyter-cache~=0.4.1
  Downloading jupyter_cache-0.4.1-py3-none-any.whl (31 kB)
Collecting jupyter-sphinx~=0.3.1
  Downloading jupyter_sphinx-0.3.2-py3-none-any.whl (20 kB)
Collecting myst-parser~=0.12.9
  Downloading myst_parser-0.12.10-py3-none-any.whl (34 kB)
  Downloading myst_parser-0.12.9-py3-none-any.whl (34 kB)
INFO: pip is looking at multiple versions of jupyter-sphinx to determine which version is compatible with other requirements. This could take a while.
Collecting jupyter-sphinx~=0.3.1
  Downloading jupyter_sphinx-0.3.1-py3-none-any.whl (19 kB)
INFO: pip is looking at multiple versions of jupyter-cache to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of jedi to determine which version is compatible with other requirements. This could take a while.
Collecting jedi>=0.10
  Downloading jedi-0.17.1-py2.py3-none-any.whl (1.4 MB)
  Downloading jedi-0.17.0-py2.py3-none-any.whl (1.1 MB)
  Downloading jedi-0.16.0-py2.py3-none-any.whl (1.1 MB)
INFO: pip is looking at multiple versions of jupyter-sphinx to determine which version is compatible with other requirements. This could take a while.
  Downloading jedi-0.15.2-py2.py3-none-any.whl (1.1 MB)
  Downloading jedi-0.15.1-py2.py3-none-any.whl (1.0 MB)
  Downloading jedi-0.15.0-py2.py3-none-any.whl (1.0 MB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading jedi-0.14.1-py2.py3-none-any.whl (1.0 MB)
INFO: pip is looking at multiple versions of jupyter-cache to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of jedi to determine which version is compatible with other requirements. This could take a while.
  Downloading jedi-0.14.0-py2.py3-none-any.whl (1.0 MB)
  Downloading jedi-0.13.3-py2.py3-none-any.whl (178 kB)
  Downloading jedi-0.13.2-py2.py3-none-any.whl (177 kB)
  Downloading jedi-0.13.1-py2.py3-none-any.whl (177 kB)
  Downloading jedi-0.13.0-py2.py3-none-any.whl (177 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading jedi-0.12.1-py2.py3-none-any.whl (174 kB)
  Downloading jedi-0.12.0-py2.py3-none-any.whl (172 kB)
  Downloading jedi-0.11.1-py2.py3-none-any.whl (250 kB)
Collecting parso==0.1.1
  Downloading parso-0.1.1-py2.py3-none-any.whl (91 kB)
INFO: pip is looking at multiple versions of parso to determine which version is compatible with other requirements. This could take a while.
Collecting jedi>=0.10
  Downloading jedi-0.11.0-py2.py3-none-any.whl (146 kB)
Collecting parso==0.1.0
  Downloading parso-0.1.0-py2.py3-none-any.whl (89 kB)
Collecting jedi>=0.10
  Downloading jedi-0.10.2-py2.py3-none-any.whl (190 kB)
  Downloading jedi-0.10.1-py2.py3-none-any.whl (179 kB)
  Downloading jedi-0.10.0-py2.py3-none-any.whl (186 kB)
INFO: pip is looking at multiple versions of ipython to determine which version is compatible with other requirements. This could take a while.
Collecting ipython
  Downloading ipython-7.18.1-py3-none-any.whl (786 kB)
  Downloading ipython-7.18.0-py3-none-any.whl (786 kB)
  Downloading ipython-7.17.0-py3-none-any.whl (786 kB)
  Downloading ipython-7.16.1-py3-none-any.whl (785 kB)
INFO: pip is looking at multiple versions of parso to determine which version is compatible with other requirements. This could take a while.
  Downloading ipython-7.16.0-py3-none-any.whl (785 kB)
  Downloading ipython-7.15.0-py3-none-any.whl (783 kB)
  Downloading ipython-7.14.0-py3-none-any.whl (782 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of ipython to determine which version is compatible with other requirements. This could take a while.
  Downloading ipython-7.13.0-py3-none-any.whl (780 kB)
  Downloading ipython-7.12.0-py3-none-any.whl (777 kB)
  Downloading ipython-7.11.1-py3-none-any.whl (777 kB)
  Downloading ipython-7.11.0-py3-none-any.whl (777 kB)
  Downloading ipython-7.10.2-py3-none-any.whl (778 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading ipython-7.10.1-py3-none-any.whl (778 kB)
  Downloading ipython-7.10.0-py3-none-any.whl (776 kB)
  Downloading ipython-7.9.0-py3-none-any.whl (775 kB)
  Downloading ipython-7.8.0-py3-none-any.whl (775 kB)
  Downloading ipython-7.7.0-py3-none-any.whl (774 kB)
  Downloading ipython-7.6.1-py3-none-any.whl (774 kB)
  Downloading ipython-7.6.0-py3-none-any.whl (774 kB)
  Downloading ipython-7.5.0-py3-none-any.whl (770 kB)
  Downloading ipython-7.4.0-py3-none-any.whl (769 kB)
  Downloading ipython-7.3.0-py3-none-any.whl (768 kB)
  Downloading ipython-7.2.0-py3-none-any.whl (765 kB)
  Downloading ipython-7.1.1-py3-none-any.whl (764 kB)
  Downloading ipython-7.0.1-py3-none-any.whl (760 kB)
  Downloading ipython-7.0.0-py3-none-any.whl (760 kB)
  Downloading ipython-6.5.0-py3-none-any.whl (748 kB)
  Downloading ipython-6.4.0-py3-none-any.whl (750 kB)
  Downloading ipython-6.3.1-py3-none-any.whl (749 kB)
  Downloading ipython-6.3.0-py3-none-any.whl (749 kB)
  Downloading ipython-6.2.1-py3-none-any.whl (745 kB)
  Downloading ipython-6.2.0-py3-none-any.whl (745 kB)
  Downloading ipython-6.1.0-py3-none-any.whl (741 kB)
  Downloading ipython-6.0.0-py3-none-any.whl (736 kB)
  Downloading ipython-5.10.0-py3-none-any.whl (760 kB)
  Downloading ipython-5.9.0-py3-none-any.whl (760 kB)
  Downloading ipython-5.8.0-py3-none-any.whl (758 kB)
  Downloading ipython-5.7.0-py3-none-any.whl (760 kB)
  Downloading ipython-5.6.0-py3-none-any.whl (760 kB)
  Downloading ipython-5.5.0-py3-none-any.whl (758 kB)
  Downloading ipython-5.4.1-py3-none-any.whl (757 kB)
  Downloading ipython-5.4.0-py3-none-any.whl (757 kB)
  Downloading ipython-5.3.0-py3-none-any.whl (750 kB)
  Downloading ipython-5.2.2-py3-none-any.whl (749 kB)
  Downloading ipython-5.2.1-py3-none-any.whl (749 kB)
  Downloading ipython-5.2.0-py3-none-any.whl (749 kB)
  Downloading ipython-5.1.0-py3-none-any.whl (747 kB)
  Downloading ipython-5.0.0-py2.py3-none-any.whl (743 kB)
INFO: pip is looking at multiple versions of ipykernel to determine which version is compatible with other requirements. This could take a while.
Collecting ipykernel>=4.5.1
  Downloading ipykernel-5.4.1-py3-none-any.whl (119 kB)
  Downloading ipykernel-5.4.0-py3-none-any.whl (119 kB)
  Downloading ipykernel-5.3.4-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.3-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.2-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.1-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.0-py3-none-any.whl (119 kB)
INFO: pip is looking at multiple versions of ipykernel to determine which version is compatible with other requirements. This could take a while.
  Downloading ipykernel-5.2.1-py3-none-any.whl (118 kB)
  Downloading ipykernel-5.2.0-py3-none-any.whl (117 kB)
  Downloading ipykernel-5.1.4-py3-none-any.whl (116 kB)
  Downloading ipykernel-5.1.3-py3-none-any.whl (116 kB)
  Downloading ipykernel-5.1.2-py3-none-any.whl (116 kB)


Command killed due to excessive memory consumption
@pradyunsg
Copy link

What happens when you run the build locally? Does it succeed after some time or does it fail with a ResolutionImpossible message?

@chrisjsewell
Copy link
Contributor Author

Eurgh so when you just try to install myst-nb (one of the key requirements) on its own, it takes ages and then you get:

action: py37-sphinx3, msg: installpkg
cwd: /Users/chrisjsewell/Documents/GitHub/MyST-NB-actual
cmd: /Users/chrisjsewell/Documents/GitHub/MyST-NB-actual/.tox/py37-sphinx3/bin/python -m pip install --exists-action w '/Users/chrisjsewell/Documents/GitHub/MyST-NB-actual/.tox/.tmp/package/2/myst-nb-0.10.1.zip[testing]'
Processing ./.tox/.tmp/package/2/myst-nb-0.10.1.zip
Requirement already satisfied: docutils>=0.15 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from myst-nb==0.10.1) (0.16)
Requirement already satisfied: sphinx<4,>=2 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from myst-nb==0.10.1) (3.3.1)
Collecting jupyter_sphinx==0.3.1
  Using cached jupyter_sphinx-0.3.1-py3-none-any.whl (19 kB)
Collecting coverage<5.0
  Using cached coverage-4.5.4-cp37-cp37m-macosx_10_13_x86_64.whl (181 kB)
Collecting ipython~=7.17
  Using cached ipython-7.19.0-py3-none-any.whl (784 kB)
Requirement already satisfied: pygments in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from ipython~=7.17->myst-nb==0.10.1) (2.7.3)
Requirement already satisfied: setuptools>=18.5 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from ipython~=7.17->myst-nb==0.10.1) (49.6.0.post20201009)
Collecting ipywidgets<8,>=7.0.0
  Using cached ipywidgets-7.5.1-py2.py3-none-any.whl (121 kB)
Collecting ipykernel>=4.5.1
  Using cached ipykernel-5.4.2-py3-none-any.whl (119 kB)
Collecting jedi>=0.10
  Using cached jedi-0.17.2-py2.py3-none-any.whl (1.4 MB)
Collecting jupyter-cache~=0.4.1
  Using cached jupyter_cache-0.4.1-py3-none-any.whl (31 kB)
Collecting jupytext>=1.6.0
  Using cached jupytext-1.7.1-py3-none-any.whl (284 kB)
  Using cached jupytext-1.7.0-py3-none-any.whl (284 kB)
  Using cached jupytext-1.6.0-py3-none-any.whl
INFO: pip is looking at multiple versions of jupyter-cache to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of jedi to determine which version is compatible with other requirements. This could take a while.
Collecting jedi>=0.10
  Using cached jedi-0.17.1-py2.py3-none-any.whl (1.4 MB)
  Using cached jedi-0.17.0-py2.py3-none-any.whl (1.1 MB)
  Using cached jedi-0.16.0-py2.py3-none-any.whl (1.1 MB)
  Using cached jedi-0.15.2-py2.py3-none-any.whl (1.1 MB)
  Using cached jedi-0.15.1-py2.py3-none-any.whl (1.0 MB)
  Using cached jedi-0.15.0-py2.py3-none-any.whl (1.0 MB)
  Using cached jedi-0.14.1-py2.py3-none-any.whl (1.0 MB)
INFO: pip is looking at multiple versions of jupyter-cache to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of jedi to determine which version is compatible with other requirements. This could take a while.
  Using cached jedi-0.14.0-py2.py3-none-any.whl (1.0 MB)
  Using cached jedi-0.13.3-py2.py3-none-any.whl (178 kB)
  Using cached jedi-0.13.2-py2.py3-none-any.whl (177 kB)
  Using cached jedi-0.13.1-py2.py3-none-any.whl (177 kB)
  Using cached jedi-0.13.0-py2.py3-none-any.whl (177 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Using cached jedi-0.12.1-py2.py3-none-any.whl (174 kB)
  Using cached jedi-0.12.0-py2.py3-none-any.whl (172 kB)
  Using cached jedi-0.11.1-py2.py3-none-any.whl (250 kB)
Collecting parso==0.1.1
  Using cached parso-0.1.1-py2.py3-none-any.whl (91 kB)
INFO: pip is looking at multiple versions of parso to determine which version is compatible with other requirements. This could take a while.
Collecting jedi>=0.10
  Using cached jedi-0.11.0-py2.py3-none-any.whl (146 kB)
Collecting parso==0.1.0
  Using cached parso-0.1.0-py2.py3-none-any.whl (89 kB)
Collecting jedi>=0.10
  Using cached jedi-0.10.2-py2.py3-none-any.whl (190 kB)
  Using cached jedi-0.10.1-py2.py3-none-any.whl (179 kB)
  Using cached jedi-0.10.0-py2.py3-none-any.whl (186 kB)
INFO: pip is looking at multiple versions of ipykernel to determine which version is compatible with other requirements. This could take a while.
Collecting ipykernel>=4.5.1
  Downloading ipykernel-5.4.1-py3-none-any.whl (119 kB)
  Downloading ipykernel-5.4.0-py3-none-any.whl (119 kB)
  Using cached ipykernel-5.3.4-py3-none-any.whl (120 kB)
INFO: pip is looking at multiple versions of parso to determine which version is compatible with other requirements. This could take a while.
  Using cached ipykernel-5.3.3-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.2-py3-none-any.whl (120 kB)
  Using cached ipykernel-5.3.1-py3-none-any.whl (120 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Using cached ipykernel-5.3.0-py3-none-any.whl (119 kB)
INFO: pip is looking at multiple versions of ipykernel to determine which version is compatible with other requirements. This could take a while.
  Downloading ipykernel-5.2.1-py3-none-any.whl (118 kB)
  Downloading ipykernel-5.2.0-py3-none-any.whl (117 kB)
  Using cached ipykernel-5.1.4-py3-none-any.whl (116 kB)
  Downloading ipykernel-5.1.3-py3-none-any.whl (116 kB)
  Downloading ipykernel-5.1.2-py3-none-any.whl (116 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading ipykernel-5.1.1-py3-none-any.whl (114 kB)
  Downloading ipykernel-5.1.0-py3-none-any.whl (113 kB)
  Downloading ipykernel-5.0.0-py3-none-any.whl (113 kB)
  Using cached ipykernel-4.10.1-py3-none-any.whl (109 kB)
  Downloading ipykernel-4.10.0-py3-none-any.whl (109 kB)
  Downloading ipykernel-4.9.0-py3-none-any.whl (110 kB)
  Downloading ipykernel-4.8.2-py3-none-any.whl (108 kB)
  Downloading ipykernel-4.8.1-py3-none-any.whl (108 kB)
  Downloading ipykernel-4.8.0-py3-none-any.whl (108 kB)
  Downloading ipykernel-4.7.0-py3-none-any.whl (106 kB)
  Downloading ipykernel-4.6.1-py3-none-any.whl (104 kB)
  Downloading ipykernel-4.6.0-py3-none-any.whl (104 kB)
  Downloading ipykernel-4.5.2-py2.py3-none-any.whl (98 kB)
  Downloading ipykernel-4.5.1-py2.py3-none-any.whl (98 kB)
INFO: pip is looking at multiple versions of ipywidgets to determine which version is compatible with other requirements. This could take a while.
Collecting ipywidgets<8,>=7.0.0
  Downloading ipywidgets-7.5.0-py2.py3-none-any.whl (121 kB)
  Downloading ipywidgets-7.4.2-py2.py3-none-any.whl (111 kB)
  Downloading ipywidgets-7.4.1-py2.py3-none-any.whl (110 kB)
  Downloading ipywidgets-7.4.0-py2.py3-none-any.whl (109 kB)
  Downloading ipywidgets-7.3.2-py2.py3-none-any.whl (110 kB)
  Downloading ipywidgets-7.3.1-py2.py3-none-any.whl (108 kB)
  Downloading ipywidgets-7.3.0-py2.py3-none-any.whl (109 kB)
INFO: pip is looking at multiple versions of ipywidgets to determine which version is compatible with other requirements. This could take a while.
  Downloading ipywidgets-7.2.1-py2.py3-none-any.whl (106 kB)
  Downloading ipywidgets-7.2.0-py2.py3-none-any.whl (107 kB)
  Downloading ipywidgets-7.1.2-py2.py3-none-any.whl (68 kB)
  Downloading ipywidgets-7.1.1-py2.py3-none-any.whl (68 kB)
  Downloading ipywidgets-7.1.0-py2.py3-none-any.whl (68 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading ipywidgets-7.0.5-py2.py3-none-any.whl (68 kB)
  Downloading ipywidgets-7.0.4-py2.py3-none-any.whl (68 kB)
  Downloading ipywidgets-7.0.3-py2.py3-none-any.whl (68 kB)
  Downloading ipywidgets-7.0.2-py2.py3-none-any.whl (66 kB)
  Downloading ipywidgets-7.0.1-py2.py3-none-any.whl (66 kB)
  Downloading ipywidgets-7.0.0-py2.py3-none-any.whl (64 kB)
INFO: pip is looking at multiple versions of ipython to determine which version is compatible with other requirements. This could take a while.
Collecting ipython~=7.17
  Using cached ipython-7.18.1-py3-none-any.whl (786 kB)
  Using cached ipython-7.18.0-py3-none-any.whl (786 kB)
  Using cached ipython-7.17.0-py3-none-any.whl (786 kB)
INFO: pip is looking at multiple versions of docutils to determine which version is compatible with other requirements. This could take a while.
Collecting docutils>=0.15
  Using cached docutils-0.15.2-py3-none-any.whl (547 kB)
INFO: pip is looking at multiple versions of ipython to determine which version is compatible with other requirements. This could take a while.
  Downloading docutils-0.15.1-post1.tar.gz (1.7 MB)
ERROR: Requested docutils>=0.15 from https://files.pythonhosted.org/packages/d4/12/6c3fd74a590c7327c98cae008c11d536029fa9cd7924de477e8cb8804186/docutils-0.15.1-post1.tar.gz#sha256=f33ddb723332c6d6b6d99731ee1fc0c35eb4044a2df5cca1c64c8aa78eaf22cb (from myst-nb==0.10.1) has different version in metadata: '0.15.1'

@chrisjsewell
Copy link
Contributor Author

chrisjsewell commented Dec 19, 2020

The above is when myst-nb is set with the requirement: myst-parser~0.13.0 (the latest version), but when you change it to myst-parser~0.12.10 (the penultimate version) it installs fine, without all these multiple version checks.

py37-sphinx3 installed: alabaster==0.7.12,appdirs==1.4.4,appnope==0.1.2,argon2-cffi==20.1.0,async-generator==1.10,attrs==20.3.0,Babel==2.9.0,backcall==0.2.0,bleach==3.2.1,certifi==2020.12.5,cffi==1.14.4,chardet==4.0.0,colorama==0.4.4,coverage==4.5.4,cycler==0.10.0,decorator==4.4.2,defusedxml==0.6.0,docutils==0.16,entrypoints==0.3,gitdb==4.0.5,GitPython==3.1.11,idna==2.10,imagesize==1.2.0,importlib-metadata==3.3.0,ipykernel==5.4.2,ipython==7.19.0,ipython-genutils==0.2.0,ipywidgets==7.5.1,jedi==0.17.2,Jinja2==2.11.2,jsonschema==3.2.0,jupyter-cache==0.4.1,jupyter-client==6.1.7,jupyter-core==4.7.0,jupyter-sphinx==0.3.1,jupytext==1.7.1,kiwisolver==1.3.1,markdown-it-py==0.5.8,MarkupSafe==1.1.1,matplotlib==3.3.3,mccabe==0.6.1,mistune==0.8.4,more-itertools==8.6.0,mpmath==1.1.0,myst-nb @ file:///Users/chrisjsewell/Documents/GitHub/MyST-NB-actual/.tox/.tmp/package/2/myst-nb-0.10.1.zip,myst-parser==0.12.10,nbclient==0.5.1,nbconvert==5.6.1,nbdime==2.1.0,nbformat==5.0.8,nest-asyncio==1.4.3,notebook==6.1.5,numpy==1.19.4,packaging==20.8,pandas==1.1.5,pandocfilters==1.4.3,parso==0.7.1,pathspec==0.8.0,pexpect==4.8.0,pickleshare==0.7.5,Pillow==8.0.1,pluggy==0.13.1,prometheus-client==0.9.0,prompt-toolkit==3.0.8,ptyprocess==0.6.0,py==1.10.0,pycodestyle==2.6.0,pycparser==2.20,pyflakes==2.2.0,Pygments==2.7.3,pyparsing==2.4.7,pyrsistent==0.17.3,pytest==5.4.3,pytest-cov==2.10.1,pytest-datadir==1.3.1,pytest-regressions==2.1.1,python-dateutil==2.8.1,pytz==2020.4,PyYAML==5.3.1,pyzmq==20.0.0,regex==2020.7.14,requests==2.25.1,Send2Trash==1.5.0,six==1.15.0,smmap==3.0.4,snowballstemmer==2.0.0,Sphinx==3.3.1,sphinx-togglebutton==0.2.3,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==1.0.3,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.4,SQLAlchemy==1.3.22,sympy==1.7.1,terminado==0.9.1,testpath==0.4.4,toml==0.10.1,tornado==6.1,traitlets==5.0.5,typed-ast==1.4.1,typing-extensions==3.7.4.3,urllib3==1.26.2,wcwidth==0.2.5,webencodings==0.5.1,widgetsnbextension==3.5.1,yapf==0.30.0,zipp==3.4.0

This is weird because there has barely been any version changes between the two:

image

jinja2 is already a dependency of sphinx anyway and markdown-it-py/mdit-py-plugins have no dependencies of their own. So it should just resolve to exactly the same, except with updated versions of myst-parser and markdown-it-py

@chrisjsewell
Copy link
Contributor Author

Jeez, then I pin a some of the package versions, and I get this:

action: py37-sphinx3, msg: installpkg
cwd: /Users/chrisjsewell/Documents/GitHub/MyST-NB-actual
cmd: /Users/chrisjsewell/Documents/GitHub/MyST-NB-actual/.tox/py37-sphinx3/bin/python -m pip install --exists-action w '/Users/chrisjsewell/Documents/GitHub/MyST-NB-actual/.tox/.tmp/package/2/myst-nb-0.10.1.zip[testing]'
Processing ./.tox/.tmp/package/2/myst-nb-0.10.1.zip
Requirement already satisfied: Jinja2==2.11.2 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from myst-nb==0.10.1) (2.11.2)
Requirement already satisfied: docutils==0.16 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from myst-nb==0.10.1) (0.16)
Requirement already satisfied: sphinx==3.3.1 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from myst-nb==0.10.1) (3.3.1)
Collecting ipykernel==5.4.2
  Using cached ipykernel-5.4.2-py3-none-any.whl (119 kB)
Collecting ipython==7.19.0
  Using cached ipython-7.19.0-py3-none-any.whl (784 kB)
Requirement already satisfied: pygments in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from ipython==7.19.0->myst-nb==0.10.1) (2.7.3)
Requirement already satisfied: setuptools>=18.5 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from ipython==7.19.0->myst-nb==0.10.1) (49.6.0.post20201009)
Requirement already satisfied: MarkupSafe>=0.23 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from Jinja2==2.11.2->myst-nb==0.10.1) (1.1.1)
Collecting jupyter_sphinx==0.3.1
  Using cached jupyter_sphinx-0.3.1-py3-none-any.whl (19 kB)
Requirement already satisfied: sphinxcontrib-htmlhelp in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (1.0.3)
Requirement already satisfied: sphinxcontrib-serializinghtml in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (1.1.4)
Requirement already satisfied: sphinxcontrib-devhelp in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (1.0.2)
Requirement already satisfied: sphinxcontrib-qthelp in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (1.0.3)
Requirement already satisfied: requests>=2.5.0 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (2.25.1)
Requirement already satisfied: packaging in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (20.8)
Requirement already satisfied: snowballstemmer>=1.1 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (2.0.0)
Requirement already satisfied: imagesize in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (1.2.0)
Requirement already satisfied: babel>=1.3 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (2.9.0)
Requirement already satisfied: sphinxcontrib-jsmath in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (1.0.1)
Requirement already satisfied: alabaster<0.8,>=0.7 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (0.7.12)
Requirement already satisfied: sphinxcontrib-applehelp in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from sphinx==3.3.1->myst-nb==0.10.1) (1.0.2)
Requirement already satisfied: pytz>=2015.7 in ./.tox/py37-sphinx3/lib/python3.7/site-packages (from babel>=1.3->sphinx==3.3.1->myst-nb==0.10.1) (2020.4)
Collecting coverage<5.0
  Using cached coverage-4.5.4-cp37-cp37m-macosx_10_13_x86_64.whl (181 kB)
Collecting ipywidgets<8,>=7.0.0
  Using cached ipywidgets-7.5.1-py2.py3-none-any.whl (121 kB)
Collecting jedi>=0.10
  Using cached jedi-0.17.2-py2.py3-none-any.whl (1.4 MB)
Collecting jupyter-cache~=0.4.1
  Using cached jupyter_cache-0.4.1-py3-none-any.whl (31 kB)
Collecting jupytext>=1.6.0
  Using cached jupytext-1.7.1-py3-none-any.whl (284 kB)
Requirement already satisfied: toml in /Users/chrisjsewell/.local/lib/python3.7/site-packages (from jupytext>=1.6.0->myst-nb==0.10.1) (0.10.1)
Collecting markdown-it-py~=0.5.2
  Using cached markdown_it_py-0.5.8-py3-none-any.whl (110 kB)
Collecting attrs
  Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting myst-parser~=0.13.0
  Using cached myst_parser-0.13.0-py3-none-any.whl (36 kB)
INFO: pip is looking at multiple versions of markupsafe to determine which version is compatible with other requirements. This could take a while.
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.0-cp37-cp37m-macosx_10_6_intel.whl (19 kB)
  Downloading MarkupSafe-1.0.tar.gz (14 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/chrisjsewell/Documents/GitHub/MyST-NB-actual/.tox/py37-sphinx3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/t2/xbl15_3n4tsb1vr_ccmmtmbr0000gn/T/pip-install-n8eptuzk/markupsafe_fbbad2aac8634677ac2b419de74d62c1/setup.py'"'"'; __file__='"'"'/private/var/folders/t2/xbl15_3n4tsb1vr_ccmmtmbr0000gn/T/pip-install-n8eptuzk/markupsafe_fbbad2aac8634677ac2b419de74d62c1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/t2/xbl15_3n4tsb1vr_ccmmtmbr0000gn/T/pip-pip-egg-info-1g9tucmi
         cwd: /private/var/folders/t2/xbl15_3n4tsb1vr_ccmmtmbr0000gn/T/pip-install-n8eptuzk/markupsafe_fbbad2aac8634677ac2b419de74d62c1/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/t2/xbl15_3n4tsb1vr_ccmmtmbr0000gn/T/pip-install-n8eptuzk/markupsafe_fbbad2aac8634677ac2b419de74d62c1/setup.py", line 6, in <module>
        from setuptools import setup, Extension, Feature
    ImportError: cannot import name 'Feature' from 'setuptools' (/Users/chrisjsewell/Documents/GitHub/MyST-NB-actual/.tox/py37-sphinx3/lib/python3.7/site-packages/setuptools/__init__.py)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

markupsafe fixed this ages ago, pypa/setuptools#2017 (comment), but now the pip resolver is digging up these old faulty versions 😬

@chrisjsewell
Copy link
Contributor Author

chrisjsewell commented Dec 19, 2020

Ah I've figured out one of my issues:

myst-nb -> myst-parser~=0.13.0 -> markdown-it-py~=0.6.0

but also

myst-nb[testing] -> jupytext>=1.16.0 -> markdown-it-py~=0.5.3

A clear inconsistency, but one that pip did not identify 😢

So yeh, to be very unappreciative of your work @pradyunsg lol; it seems that when the pip resolver works its great 👍, but if there are any inconsistencies in the requirements it is prone to send it off on a "wild goose chase", in the case of RTD, often ending in an excessive memory consumption error 😞

(I completely understand that these dependency resolvers are not an easy thing to achieve though)

@chrisjsewell
Copy link
Contributor Author

out of interest @pradyunsg does the pip resolver use the PyPi JSON API, like poetry claims to do https://python-poetry.org/docs/faq/#why-is-the-dependency-resolution-process-slow?
I was thinking there must be a way to check dependencies, without downloading the whole package, but I guess that depends how the package is uploaded to PyPi?

@pradyunsg
Copy link

Hmm... Maybe you have a dependency conflict somewhere? I'll need to take a closer look at this, but I'm moving houses tomorrow. Please feel free to ping me over the weekend if I've not taken a look?

pip doesn't use the JSON API because it's not standardised, and thus cannot be used on non-PyPI indexes. There's an effort to standardise it, but that's been a little slow given the all-volunteer nature of things.

@humitos
Copy link
Member

humitos commented Dec 29, 2020

but I'm opening it here as well, to track its progress, since it is only on RTD that I have encountered it, and I'm sure I will not be the only RTD user affected by this.

Do you know the reason of why this is only happening in Read the Docs for your setup?

It seems that pip is cycling over the dependencies and downloading all versions of the same package (i.e ipython 7.x down to 5.x) and finally RTD kills this build because of "Build exited due to time out".

@chrisjsewell
Copy link
Contributor Author

Do you know the reason of why this is only happening in Read the Docs for your setup?

Just because RTD uses small VMs for the build, with limited memory. This is generally fine, but when pip starts downloading lots of different versions it can eat up that memory fast.

Just to clarify, in the specific case I linked to above, it was "solved" by making some changes to the dependency versions, albeit these fixes were not at any stage obvious from the pip install failures.

But in other cases, the dependencies have all been correct, and it has required additional pinnings which are not strictly necessary (for example aiidateam/aiida-tutorials#278 (comment))

@humitos
Copy link
Member

humitos commented Dec 29, 2020

Just because RTD uses small VMs for the build, with limited memory. This is generally fine, but when pip starts downloading lots of different versions it can eat up that memory fast.

Hrm... In the particular build that you mentioned in the description, https://readthedocs.org/projects/markdown-it-py/builds/12576084/, that build was done in a 8Gb RAM VM. That build was killed due to time out (the message at the command output is incorrect) because it took more than 2011s to complete.

We can increase the building time for that project if you want as a test. pip install command is taking ~1900s to complete, which looks a lot to install just a few dependencies; but it's taking this extra time because it's downloading the same package (with different version) multiple times.

@chrisjsewell
Copy link
Contributor Author

That build was killed due to time out (the message at the command output is incorrect) because it took more than 2011s to complete.

Wait you're saying that this is not correct "Command killed due to excessive memory consumption"?

We can increase the building time for that project

as mentioned, this particular project is "fixed" now, so I don't need that thanks

@humitos
Copy link
Member

humitos commented Jan 4, 2021

Wait you're saying that this is not correct "Command killed due to excessive memory consumption"?

We add that message when we think it was killed due to memory, but it's not 100% guaranteed that it was a memory issue all the times. In particular, when the build has both messages: time out and memory, I'd trust more the time out one if the build took a lot of time as this case.

However, if the exit code is 137 (our custom code for DOCKER OOM) there are more chances that it was a real OOM instead time out.

@stsewd
Copy link
Member

stsewd commented Jan 4, 2021

BTW, if this doesn't happen on a previous version of pip, a workaround can be to downgrade pip on rtd #7752 (comment)

@humitos
Copy link
Member

humitos commented Feb 15, 2021

Is there anything actionable on this issue or we should close it?

@humitos humitos added the Needed: more information A reply from issue author is required label Feb 15, 2021
@chrisjsewell
Copy link
Contributor Author

hey @humitos no thanks I guess in the end just something to bear in mind if others report similar issues; but mainly a pip issue.

@no-response no-response bot removed the Needed: more information A reply from issue author is required label Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants