git.iko.soy/typeable/nixpkgs
on master help sign in
pipenv: Ignore Python site-packages

pipenv nix wrapper contains a PYTHONPATH which has some dependencies for pipenv installed. pipenv by default uses site-packages when resolving packages, which means that any package that is included in the nix wrapper is satisfied when running `pipenv install`. But when the actual virtualenv created by pipenv is activated, it doesn't contain those packages anymore and fails to import them. pipenv has a flag PIP_IGNORE_INSTALLED which can be used to ignore site-packages. Which fixes the problem of having different resolved packages when running pipenv and when running the virtualenv.

commit11d491dce56b964dffd0175f891299bee646501d authorVäinö Järvelä <vaino@jarve.la> dateSat 6 Apr 2019, 07:39 (8 years ago) parent99eddf3
1 file changed+1
pkgs/development/tools/pipenv/default.nix+1
pkgs/development/tools/pipenv/default.nix+1
@@ -24,6 +24,7 @@ buildPythonApplication rec {
2424
2525 makeWrapperArgs = [
2626 "--set PYTHONPATH \"$PYTHONPATH\""
27+ "--set PIP_IGNORE_INSTALLED 1"
2728 ];
2829
2930 meta = with stdenv.lib; {