MichaelAquilina/zsh-autoswitch-virtualenv

python binary not found on PATH, zsh-autoswitch-virtualenv plugin will be disabled

adamko147 opened this issue · 0 comments

Issue Details

Plugin won't load with error WARNING: python binary not found on PATH.

I have python 3.10.x installed on as package and as macOS Monterey might not have default python 2.x installed. This causes the check

$ type python 
python not found

although I have properly installed python3

$ type python3
python3 is /Library/Frameworks/Python.framework/Versions/3.10/bin/python3

I have set

export AUTOSWITCH_DEFAULT_PYTHON=python3

in my ~/.zshrc before loading the oh-my-zsh/plugin, however this has no effect as the python string is hardcoded at https://github.com/MichaelAquilina/zsh-autoswitch-virtualenv/blob/master/autoswitch_virtualenv.plugin.zsh#L416

Operating System (uname -a)

Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64

zsh version (zsh --version)

zsh 5.8.1 (x86_64-apple-darwin21.0)

autoswitch-virtualenv version

echo "$AUTOSWITCH_VERSION"
3.6.0

How is zsh-autoswitch-virtualenv installed?

  • oh-my-zsh

Steps to reproduce the issue

most probably easiest way to reproduce is remove python symlink pointing to either python2 or python3