which: no python3 in xx

window10上安裝python37-32版本
cmd執行env which python3 報下面錯誤

which: no python3 in (/mingw64/bin:/usr/bin:/c/Users/Jersey/bin:/d/Program Files/xftp6:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/Program
Files (x86)/Intel/iCLS Client:/c/Program Files/Intel/iCLS Client:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPower
Shell/v1.0:/c/Program Files (x86)/Intel/Intel®

原因python安裝目錄沒有python3文件名的可執行文件

解決方法

安裝目錄複製一份python.exe,重命名python3.exe

$ env which python3
which: no python3 in (/mingw64/bin:/usr/bin:/c/Users/Jersey/bin:/d/Program Files/xftp6:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/Users/Jersey/AppData/Local/Programs/Python/Python37
-32/Scripts:/c/Users/Jersey/AppData/Local/Programs/Python/Python37-32:)

ojbk.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章