From 11d491dce56b964dffd0175f891299bee646501d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A4in=C3=B6=20J=C3=A4rvel=C3=A4?= Date: Sat, 6 Apr 2019 07:39:33 +0300 Subject: [PATCH] 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. --- pkgs/development/tools/pipenv/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/pipenv/default.nix b/pkgs/development/tools/pipenv/default.nix index 3deb7b9643c..8083151ef81 100644 --- a/pkgs/development/tools/pipenv/default.nix +++ b/pkgs/development/tools/pipenv/default.nix @@ -24,6 +24,7 @@ buildPythonApplication rec { makeWrapperArgs = [ "--set PYTHONPATH \"$PYTHONPATH\"" + "--set PIP_IGNORE_INSTALLED 1" ]; meta = with stdenv.lib; {