From b349befbf42e5062456ff53c4b2efdede08b7a38 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 22 Mar 2022 13:28:08 +0000 Subject: [PATCH] Be explicit about `python` absolute path One some distros `virtualenv` still uses a Python 2 executable, I always set `python` to point to Python 3 so be explicit about getting the absolute path to `python` when creating a `virtualenv` with `autoenv add=py`. --- autoenv/autoenv.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoenv/autoenv.zsh b/autoenv/autoenv.zsh index 72fe0aa..4e87b83 100644 --- a/autoenv/autoenv.zsh +++ b/autoenv/autoenv.zsh @@ -97,7 +97,7 @@ commands: echo '.enter or .exit not found'; return 1 fi _autoenv_exit $PWD - virtualenv .local + virtualenv -p `command -v python` .local echo 'source ${0:a:h}/.local/bin/activate' >> .enter echo 'deactivate' >> .exit _autoenv_authorized $PWD/.enter yes