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

restvv build fails to install pytest_cov dependency #45

Closed
phwhite-coh opened this issue Dec 9, 2020 · 1 comment
Closed

restvv build fails to install pytest_cov dependency #45

phwhite-coh opened this issue Dec 9, 2020 · 1 comment

Comments

@phwhite-coh
Copy link

This is the error I'm getting:

Downloading pytest-cov-1.1.tar.gz (7.0 kB)
Downloading pytest-cov-1.0.tar.gz (6.9 kB)
Downloading pytest-cov-0.15.tar.gz (12 kB)
Downloading pytest-cov-0.14.tar.gz (12 kB)
Downloading pytest-cov-0.13.tar.gz (12 kB)
Downloading pytest-cov-0.12.tar.gz (12 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bjm4od9b/pytest-cov_03a35a85509d46f99aa5bfe9d7c39c02/setup.py'"'"'; file='"'"'/tmp/pip-install-bjm4od9b/pytest-cov_03a35a85509d46f99aa5bfe9d7c39c02/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 /tmp/pip-pip-egg-info-rjh47xki
cwd: /tmp/pip-install-bjm4od9b/pytest-cov_03a35a85509d46f99aa5bfe9d7c39c02/
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-bjm4od9b/pytest-cov_03a35a85509d46f99aa5bfe9d7c39c02/setup.py", line 1, in
import pytest_cov
File "/tmp/pip-install-bjm4od9b/pytest-cov_03a35a85509d46f99aa5bfe9d7c39c02/pytest_cov.py", line 202, in
import coverage
ModuleNotFoundError: No module named 'coverage'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Service 'restvv' failed to build : The command '/bin/sh -c pip install -r REQUIREMENTS.txt' returned a non-zero code: 1

I can actually get by this error by setting a min version for pytest_cov in REQUIREMENTS.txt. But the build is taking forever as it's now going through dozens of versions of pytest.

The strange thing is that I didn't encounter this issue last time I built this, a few months ago, but now I'm having the problem on two different machines, my macOS dev box and the Linux server I'm deploying this to. It's almost as if the problem is with the pip repo.

Thanks!

@phwhite-coh
Copy link
Author

phwhite-coh commented Dec 11, 2020

I think I see now, the Dockerfile always upgrades pip to the latest, and there are issues with the resolver in pip 20.3, which was released a few weeks ago. I can get around the problem now by adding the following option in the Dockerfile:
RUN pip install -r REQUIREMENTS.txt --use-deprecated=legacy-resolver
Related issue

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

1 participant