簡體   English   中英

bash:ls:找不到命令

[英]bash: ls: command not found

這是我第一次使用 GitBash。 當 GitBash 找不到我的 python 時遇到問題:

$ python --version bash:python:找不到命令

然后我嘗試使用以下方法修復它:

導出 PATH='$PATH:/c/Users/usr/anaconda3'

之后 python 命令開始工作,但其他一些命令丟失了: $ ls bash: ls: command not found

Found one simmilar case but didn't quite understand what I have to do Windows 10, Git Bash - bash: git: command not found

嘿,很確定你需要在沒有引號的情況下這樣做:export PATH=$PATH:/c/Users/usr/anaconda3

見圖片:示例圖片

無論如何,在重新啟動 gitbash 之后,PATH 變量應該恢復到它的默認值。 如果不是,我建議將以下內容添加到路徑中:

/c/Users/<YOUR_HOSTNAME>/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM