Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pyenv in fish: Unknown command: pyenv

Tags:

pyenv

fish

When I started my fish shell today I got following error:

fish: Unknown command: pyenv
~/.config/fish/conf.d/pyenv.fish (line 3): 
pyenv init --path | source
^
from sourcing file ~/.config/fish/conf.d/pyenv.fish
    called on line 253 of file /usr/local/Cellar/fish/3.3.1/share/fish/config.fish
from sourcing file /usr/local/Cellar/fish/3.3.1/share/fish/config.fish
    called during startup
fish: Unknown command: pyenv
~/.config/fish/conf.d/pyenv.fish (line 4): 
pyenv init - | source
^
from sourcing file ~/.config/fish/conf.d/pyenv.fish
    called on line 253 of file /usr/local/Cellar/fish/3.3.1/share/fish/config.fish
from sourcing file /usr/local/Cellar/fish/3.3.1/share/fish/config.fish
    called during startup

I never had it before so I think it's due to a pyenv update?

My pyenv.fish file is as follows:

set -x PATH ~/.pyenv/bin $PATH

pyenv init --path | source
pyenv init - | source

Anyone has an idea how to solve this? I did not find any solution via google.

like image 744
sg_sg94 Avatar asked Oct 12 '25 07:10

sg_sg94


1 Answers

This error means that fish can't find a thing called pyenv to execute.

Most likely that means that there is no file called pyenv in ~/.pyenv/bin, or it's not executable.

So it appears you broke your pyenv installation or haven't installed it yet (e.g. on a new machine).

like image 107
faho Avatar answered Oct 16 '25 05:10

faho



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!