pipenv: Pipenv no longer working under the root directory is not listed as a breaking change
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
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 45
- Comments: 28 (8 by maintainers)
Commits related to this issue
- Install old version of pipenv. New one introduces bug with --system (pypa/pipenv#4273). — committed to 5GEVE/mso-lo by TheWall89 4 years ago
- Install specified version of pipenv https://github.com/pypa/pipenv/issues/4273 — committed to dainst/cilantro by ngrippa 4 years ago
- Lock pipenv version to work around https://github.com/pypa/pipenv/issues/4273 — committed to harveyrendell/discord-echo by harveyrendell 4 years ago
- lock pipenv version as workaround for https://github.com/pypa/pipenv/issues/4273 — committed to harveyrendell/discord-karma by harveyrendell 4 years ago
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.Using
WORKDIRdid not work for me. I’m getting errorwhen using dockerfile below
Not a funny breaking changes, all our dockers are using pipenv install during build 😕
This issue is still present in the 2020.6.2 release:
Output: Failed to load paths: /bin/sh: 1: /root/.local/share/virtualenvs/app-lp47FrbD/bin/python: not found
Could you please confirm if this issue was expected to be fixed in 2020.6.2 release?
@frostming Can you please reopen the issue?
@techalchemy This is the relevant portions of our Dockerfile which no longer works.
For anyone who wants to use the latest pipenv with
--system, adapting your Dockerfile by setting a WORKDIR and copying your Pipfile/lockfile into it as follows may be helpful:For folks still having this issue the easiest fix is to configure your Dockerfile as:
I can also confirm I’m hitting this issue with the following Dockerfile:
Here is the error:
I can confirm I’m hitting this issue with the following
Dockerfilewe need to ensure all regression issues are fixed and the new release will be out in the next week
the WORKDIR command already creates the directory if it does not exist
This worked for me. Just remember to create the
/codedir before.Thank you for fixing, do you have an ETA on when the fix will be included in a new release of the pypi package?
As I just mentioned in #4275:
This is not intended to be a breaking change, it’s intended to prevent a previously broken interaction – for anyone for whom this was working, please include the full set of command line arguments you were passing to pipenv (e.g.
pipenv install --<whatever>and information about your workflow:--systemto pipenv, creating your own virtualenv, or allowing pipenv to create one for you?Thats probably enough for now
Run into the same issue, using fix in https://github.com/pypa/pipenv/issues/4273#issuecomment-635303079 worked for me.
<del>@gps035 Any chance sending a PR to mention it in the CHANGELOG?</del>
I have filed a PR to address this issue, thanks for everyone.
hi @gps035,
I’m having the same issue with pipenv. Could you please show how you’ve pinned the
pipenvversion ?Thanks