Closed moha-gh closed 2 years ago
Python not being in your path is an issue though 🤔 Maybe we can make this more explicit in the README but we would expect a python binary being available in your path considering this is a plugin related to python virtualenvs
We could also warn the user that they need to do this if we detect this issue as you suggested
Python not being in your path is an issue though thinking Maybe we can make this more explicit in the README but we would expect a python binary being available in your path considering this is a plugin related to python virtualenvs
A reasonable assumption, yes. Since I haven't encountered any other issue with this setup so far (as mentioned, the venv is working fine - same goes for tools like pip
or development in VS Code) I still wanted to bring it up :) It'd be happy to file a PR that extends the documentation accordingly.
Go for it @moha-gh :)
The new check added with #172 works as expected for me. To make python
available in $PATH
I've installed the python-is-python3
package via apt install
.
Issue Details
KDE neon (basically Ubuntu LTS + bleeding edge KDE) apparently doesn't have a
python
in$PATH
by default - you'll need to explicitly call eitherpython2
orpython3
. This breaks the generation of the random virtualenv suffix introduced with #166. I get acommand not found
error when callingmkvenv
and end up with avirtualenv
without a suffix. Everything apart from that works fine (i.e. the venv automatically picks Python3, even though it is not in$PATH
).Since that seems to be the only place in the plugin that expects a
python
, I'd be great if there could be some check to warn the user if it isn't available. Or possibly use a different method (mktemp -u XXXX
comes to mind, but I have no idea whether that would be available on all supported platforms :grey_question: )Operating System (uname -a)
Linux 5.13.0-35-generic #40~20.04.1-Ubuntu SMP Mon Mar 7 09:18:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
zsh version (zsh --version)
zsh 5.8 (x86_64-ubuntu-linux-gnu)
autoswitch-virtualenv version
3.5.0
How is zsh-autoswitch-virtualenv installed?
Steps to reproduce the issue
gist link to your zshrc
n/a