Closed agamm closed 1 year ago
The issue is that /mnt/c/Users/UserName/.pyenv/pyenv-win/bin/
is in your $PATH
(or that your window's path is being shared with the WSL instance). Try running echo $PATH | ag "/mnt/c/Users"
to see if the above statement is true. (ag
can be installed with sudo apt install the-silver-searcher
assuming you're using ubuntu).
To resolve the issue make sure the following is in your .bashrc
file (assuming bash/zsh):
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
# omit the last eval command if you don't want to use virtualenvs
# otherwise make sure you've completed the
# install instructions found here: https://github.com/pyenv/pyenv-virtualenv
eval "$(pyenv virtualenv-init -)"
then run the following command to rerun all the commands in .bashrc
source ~/.bashrc
Now pyenv
should work correctly and this error should no longer appear.
Something here worked, thanks!
Steps:
curl https://pyenv.run | bash
exec $SHELL
pyenv
Result:
Take note of the
^M
, seems related to this. Or I suspect it thinks it is in windows when it is running inside an ubuntu vm (via WSL).