From 7b96dfb457e809e6057702c7929e26ce4711c04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 15 Oct 2024 19:25:22 +0200 Subject: [PATCH] flake: fix two versions of python in shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: ``` Traceback (most recent call last): File "/home/jakubgs/work/infra-eth2/ansible/lookup_plugins/vault.py", line 6, in import hvac ModuleNotFoundError: No module named 'hvac' ``` Before. ``` > echo $PATH | tr ':' '\n' | grep python3- /nix/store/04gg5w1s662l329a8kh9xcwyp0k64v5a-python3-3.12.4/bin /nix/store/38nsff4vmhjmvfsi864yb23y9rk9gw5c-python3-3.11.9-env/bin ``` After the fix. ``` > echo $PATH | tr ':' '\n' | grep python3- /nix/store/04gg5w1s662l329a8kh9xcwyp0k64v5a-python3-3.12.4/bin /nix/store/pxgdzih20d368bx0h0kzyln5hl5cjgyl-python3-3.12.4-env/bin ``` Caused by upgrade to `unstable` without checking default Python version. Signed-off-by: Jakub SokoĊ‚owski --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index ee0b28d..484fff6 100644 --- a/flake.nix +++ b/flake.nix @@ -19,8 +19,8 @@ pkgs = pkgsFor.${system}; in { default = let - pythonPkgs = pkgs.python311.withPackages ( - _: with (pkgs.python311Packages); [ + pythonPkgs = pkgs.python3.withPackages ( + _: with (pkgs.python3Packages); [ ipython pyyaml jinja2 PyGithub pyopenssl cryptography hvac