내가 할 때
which pip3
나는 얻다
/usr/local/bin/pip3
그러나 실행하려고하면 pip3다음과 같은 오류가 발생합니다.
bash: /usr/bin/pip3: No such file or directory
최근에 해당 파일을 삭제했기 때문입니다. 이제 which또 다른 버전으로 명령 점을 pip3그에 위치하고 /usr/local/bin있지만, 쉘은 여전히 잘못된 경로를 기억합니다. 그 길을 잊게하려면 어떻게해야합니까?
which설명서를 말한다
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.
모두 /usr/local/bin와 /usr/bin내에있는 PATH변수와 /usr/local/bin/pip3기호 링크가 아닌, 그것을 실행합니다. 왜 실행되지 않습니까?
이전
—
Eric Renouf
pip3에 해당 쉘에서 실행 /usr/bin한 후 이동 했습니까?
당신이 실행하면 무엇을 볼 수
—
Eric Renouf
hash -t pip3있습니까?
@Eric Renouf
—
spiderface
hash -t pip3prints/usr/bin/pip3
아주 좋은 이유가 없다면 항상
—
이카루스
type보다을 사용해야 which합니다. typeposix 쉘에 내장되어 있으며 쉘이 무엇을하는지 which추측 하지 않고 쉘이 무엇을하는지 알려줍니다 .
/usr/local/bin/pip3?