Describe the bug
The below nix-shell expression, when run, fails with this error:
$ nix-shell shell.nix
Using base prefix '/nix/store/80qva2zal82njkg4zvb7xg94mnikqksd-python3-3.6.8'
New python executable in /home/nixos/CIDA/cow_health/venv/bin/python3.6m
Also creating executable in /home/nixos/CIDA/cow_health/venv/bin/python
Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/home/nixos/CIDA/cow_health/venv/bin/pip", line 7, in <module>
from pip._internal.main import main
ModuleNotFoundError: No module named 'pip._internal.main'
Traceback (most recent call last):
File "/home/nixos/CIDA/cow_health/venv/bin/pip", line 7, in <module>
from pip._internal.main import main
ModuleNotFoundError: No module named 'pip._internal.main'
Here is the nix expression:
with import <nixpkgs> {};
with pkgs.python36Packages;
stdenv.mkDerivation {
name = "impurePythonEnv";
buildInputs = [
# these packages are required for virtualenv and pip to work:
#
mypy
python36Full
python36Packages.virtualenv
python36Packages.pip
python36Packages.numpy
];
src = null;
# TODO: convert to full nix expression so as to not rely on pip
shellHook = ''
# set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s)
export LANG=en_US.UTF-8
virtualenv venv
source venv/bin/activate
export PATH=$PWD/venv/bin:$PATH
export PYTHONPATH=$PWD:$PYTHONPATH
pip install mypy Cython
pip install pandas rope sxapi
source $HOME/.dairy_creds.sh
'';
}
To Reproduce
Steps to reproduce the behavior:
nix-shell shell.nixExpected behavior
In the recent past, before updating my system, this succeeded.
Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.
"x86_64-linux"Linux 4.14.118, NixOS, 18.09.2574.a7e559a5504 (Jellyfish)yesyesnix-env (Nix) 2.1.3"""nixos-18.09.2574.a7e559a5504"/nix/var/nix/profiles/per-user/root/channels/nixosDuplicate of https://github.com/NixOS/nixpkgs/issues/71178
Also, i noticed you're using 18.09, you may want to bump to a more recent nixos version
Thanks, I updated (finally) and followed the advice in that issue, in particular https://github.com/NixOS/nixpkgs/issues/71178#issuecomment-562609408, and everything is peachy.