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

2018.11.14 regression: pipenv install --system --keep-outdated --ignore-pipfile #3222

Closed
jeremycarroll opened this issue Nov 15, 2018 · 2 comments

Comments

@jeremycarroll
Copy link
Contributor

@jeremycarroll jeremycarroll commented Nov 15, 2018

Issue description

I have a dockerfile with this line:
RUN test -f "./Pipfile.lock" && pipenv install --system --keep-outdated --ignore-pipfile || pipenv install --system --skip-lock
where Pipfile.lock does exist, and is sane

Expected result

The dependencies to be installed.

Actual result

Step 16/26 : RUN test -f "./Pipfile.lock" && pipenv install --system --keep-outdated --ignore-pipfile || pipenv install --system --skip-lock
 ---> Running in d81fb93ac9d5
Installing dependencies from Pipfile.lock (3123d8)…
An error occurred while installing atomicwrites==1.2.1 --hash=sha256:0312ad34fcad8fac3704d441f7b317e50af620823353ec657a53e981f92920c0 --hash=sha256:ec9ae8adaae229e4f8446952d204a3e4b5fdd2d099f9be3aaf556120135fb3ee! Will try again.
An error occurred while installing attrs==18.2.0 --hash=sha256:10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69 --hash=sha256:ca4be454458f9dec299268d472aaa5a11f67a4ff70093396e1ceae9c76cf4bbb! Will try again.
...
[pipenv.exceptions.InstallError]:   File "/home/user/.local/lib/python3.7/site-packages/pipenv/cli/command.py", line 249, in install
[pipenv.exceptions.InstallError]:       editable_packages=state.installstate.editables,
[pipenv.exceptions.InstallError]:   File "/home/user/.local/lib/python3.7/site-packages/pipenv/core.py", line 1872, in do_install
[pipenv.exceptions.InstallError]:       keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]:   File "/home/user/.local/lib/python3.7/site-packages/pipenv/core.py", line 1232, in do_init
[pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]:   File "/home/user/.local/lib/python3.7/site-packages/pipenv/core.py", line 844, in do_install_dependencies
[pipenv.exceptions.InstallError]:       _cleanup_procs(procs, False, failed_deps_queue, retry=False)
[pipenv.exceptions.InstallError]:   File "/home/user/.local/lib/python3.7/site-packages/pipenv/core.py", line 676, in _cleanup_procs
[pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Looking in indexes: https://packagecloud.io/syapse/General/pypi/simple, https://pypi.org/simple', 'Collecting atomicwrites==1.2.1 (from -r /tmp/pipenv-v4zkxmcp-requirements/pipenv-yejowapf-requirement.txt (line 1))', '  Downloading https://files.pythonhosted.org/packages/3a/9a/9d878f8d885706e2530402de6417141129a943802c084238914fa6798d97/atomicwrites-1.2.1-py2.py3-none-any.whl', 'Installing collected packages: atomicwrites']
[pipenv.exceptions.InstallError]: ["Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/site-packages/atomicwrites-1.2.1.dist-info'", 'Consider using the `--user` option or check the permissions.']
ERROR: ERROR: Package installation failed...

Steps to replicate

I haven't yet got a minimal repro, but thought I should flag there is an issue.

A workaround is to modify the line in the Dockerfile where Pipenv is installed, to have an explicit version number:
RUN python -m pip install --upgrade --user pipenv==v2018.10.9

@techalchemy
Copy link
Member

@techalchemy techalchemy commented Nov 15, 2018

Yikes. We need a test for this. Sorry!

@techalchemy
Copy link
Member

@techalchemy techalchemy commented Nov 15, 2018

Oh, I get it. The issue is that we explicitly disable --user during installation, and turn off the user flag. As of some super recent release, I believe the relevant container distro actually tries to turn this flag on. So the conflict is happening with the use of the --system flag here because we aren't playing nice in the sandbox. Let me see.

techalchemy added a commit that referenced this issue Nov 15, 2018
- Fixes #3222

Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy added this to the November Bugfix Release milestone Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.