Quando eu faço
which pip3
eu recebo
/usr/local/bin/pip3
mas quando tento executar pip3, recebo um erro da seguinte maneira:
bash: /usr/bin/pip3: No such file or directory
Isso ocorre porque eu excluí recentemente esse arquivo. Agora, o whichcomando aponta para outra versão pip3localizada, /usr/local/binmas o shell ainda se lembra do caminho errado. Como faço para esquecer esse caminho?
O whichmanual diz
which returns the pathnames of the files (or links) which would be executed in the current environment, had its arguments been given as commands in
a strictly POSIX-conformant shell. It does this by searching the PATH for executable files matching the names of the arguments. It does not follow
symbolic links.
Ambos /usr/local/bine /usr/binestão na minha PATHvariável, e /usr/local/bin/pip3não é um link simbólico, é um executável. Então, por que não é executado?
pip3naquele shell enquanto ele estava /usr/bine o mudou?
hash -t pip3?
hash -t pip3prints/usr/bin/pip3
typeeather which. typeé construído em um shell posix e informa o que um shell fará, em vez de whichqual tenta adivinhar o que o shell fará.
/usr/local/bin/pip3?