-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
pipenv won't install on current nixpkgs-unstable #80087
Comments
Follow up to this: TLDR: Python is a pain in the ass. Unset the It seems to be that that the So taking a look at the pip executable created by pipenv: import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main()) The offending line is Seems that unsetting the python path forces the
More research may be needed here to get a good solution. |
(Thank you for your analysis. I do really appreciate it.)
Is there a good way to do this in |
FWIW, this appears to fix it: 5ca385e (but also does not yet seem to be in -unstable) |
Going to close this one since |
Thanks for this! |
Just in case anyone else lands here as well, just as I did - this is now in |
Describe the bug
nix-shell -p python3 -p pipenv
fails.This is because of
from pip._internal.cli.main import main', "ModuleNotFoundError: No module named 'pip._internal.cli.main'"
which was previously addressed in #71178.I've been having trouble with pipenv on my main machine (MacOS 10.15/Catalina with /nix provisioned via @steshaw's method) for the past little bit, and I thought I had an isolated problem. Today, I fired up a spare Macbook Pro and installed 10.15, fresh, used the same method for
/nix
, and ran through the regularcurl https://nixos.org/nix/install | sh
method. It failed there too.Here is a full log of this command on a fresh nix install.
To Reproduce
Steps to reproduce the behavior:
nix-shell -p python3 -p pipenv
Expected behavior
A working
pipenv
. What I actually got is at the end of the above-linked log.Screenshots

Additional context
Brand new nix install. No local overlays. Not even anything installed with
nix-env -i …
.Nix channel is:
Metadata
The text was updated successfully, but these errors were encountered: