question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipenv no longer working under the root directory is not listed as a breaking change

See original GitHub issue

Issue description

Our docker builds failed this morning due to a change in behaviour when running pipenv install in the root directory. When running with the latest version (2020.5.28) an error is thrown after dependencies are built and installed ERROR: Pipenv is not intended to work under the root directory, please choose another path. It looks like this is a change introduced in #3386, relating to an issue raised in #3434. This issue is really just to point out that this behaviour change should be listed as breaking in the changelog, as it doesn’t currently appear to be mentioned. For the time being we have worked around this by pinning pipenv to the last version (2018.11.26).

Expected result

N/A

Actual result

N/A

Steps to replicate

N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:45
  • Comments:28 (8 by maintainers)

github_iconTop GitHub Comments

23reactions
jean-malocommented, May 28, 2020

I can confirm that this behaviour does not happen on version 2018.11.26.

@mohamedMok You can use pip install 'pipenv==2018.11.26' which is the last version that does not have this breaking change.

19reactions
killuazhucommented, May 28, 2020

Using WORKDIR did not work for me. I’m getting error

Step 9/9 : RUN PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-pipfile
 ---> Running in da6fa387210f
Installing dependencies from Pipfile.lock (387af5)…
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/build-5NmaZ4l5/bin/python: not found

Output: 
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/build-5NmaZ4l5/bin/python: not found

Output: 
Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/build-5NmaZ4l5/bin/python: not found

Output: 
^Cmake: *** [build-image-base] Interrupt: 2

when using dockerfile below

FROM python:3-slim AS base

ENV PYROOT /pyroot
ENV PYTHONUSERBASE $PYROOT
ENV PATH $PATH:$PYROOT/bin

FROM base AS builder
WORKDIR /build
RUN pip install pipenv
COPY Pipfile* /build/
RUN PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-pipfile
Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv updates all dependencies bringing breaking changes
The problem is when I want to install a new depedency. I open the docker container shell, and I install the dependency with...
Read more >
Common Pipenv Errors - Towards Data Science
The virtual environment is stored globally with the name of the project's root directory plus the hash of the full path to the...
Read more >
pipenv Documentation - manpages.ubuntu!
To install packages, change into your project's directory (or just an empty directory for this tutorial) and run: $ cd myproject $ pipenv...
Read more >
pipenv Documentation - Read the Docs
Running Pipenv as root or with sudo (or Admin on Windows) is highly discouraged and might lead to unintend breakage of your OS....
Read more >
Pipenv & Virtual Environments
Python has included venv module from version 3.3. For more details: venv. Other Notes¶. Running virtualenv with the option --no-site ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found