由於某些原因,無論何時在PowerShell中鍵入'python',它都會告訴我'python'無法識別。我知道它在其他人的電腦上工作,所以我想知道我做錯了什麼。我知道這是模糊的,但我真的不知道我應該做什麼。我使用python.org的python。非常感謝。Python - Powershell
0
A
回答
2
第一次嘗試將蟒蛇到您的路徑:
$env:Path = $env:Path + ";C:\Program Files\Python\"
注意,路徑可能會在您的機器上有所不同。
順便說一句,PS - Python集成,你可能想要玩IronPython: Embedding IronPython in PowerShell。
+0
非常感謝你 –
+0
由於某種原因,每當我退出powershell,這撤銷自己,我必須再次輸入所有的代碼。任何想法爲什麼? –
相關問題
- 1. Powershell Python
- 2. Python,PowerShell或其他?
- 3. 基於python的PowerShell?
- 4. PowerShell無法識別Python
- 5. Python來的PowerShell,幹:類
- 6. Powershell替代Python shlex.split函數
- 7. Python執行powershell命令
- 8. Python的參數在PowerShell中
- 9. 從Python運行Powershell命令
- 10. 與PowerShell的Python交互
- 11. Python版本在PowerShell中
- 12. Powershell中的Python 2和3
- 13. 在powershell腳本中運行python腳本
- 14. 從PowerShell運行python源文件
- 15. 從PowerShell終端添加到Python腳本?
- 16. 在Python腳本中運行PowerShell cmdlet
- 17. python腳本不能在PowerShell中工作
- 18. 將Python循環轉換爲PowerShell
- 19. 從Python運行PowerShell功能不工作
- 20. 從PowerShell腳本輸入到Python程序?
- 21. 在PowerShell中設置Python的路徑?
- 22. 在Python外執行PowerShell腳本
- 23. Python腳本未在PowerShell上運行
- 24. Python requests.get()VS Powershell調用WebRequest -Uri
- 25. 與Python(而不是IronPython)的Powershell集成
- 26. 從python代碼運行PowerShell腳本
- 27. Powershell中的Python搜索代碼
- 28. 動態地在Python中編寫PowerShell CmdLets
- 29. 我試圖在PowerShell中使用python
- 30. Powershell Python:使用更改版本
您是否將python添加到您的路徑中?它是否適用於常規命令提示符,還是它是PowerShell特定的? –
此外,如果在將python添加到路徑(通過安裝程序或系統控制面板中的複選框等)之前,您已經運行了powershell,則可能需要啓動新的powershell實例。 – abarnert
在$ powershell中鍵入$ env:path並查看python.exe的目錄是否在那裏。如果不是其他評論有好的建議。 –