2017-04-10 316 views
2

在Windows 10使用Git的Bash如何在Windows中使用git bash設置python路徑?

Python版本:2.7.12

當運行pip,它表明:

$ pip 
bash: /c/cygwin/bin/pip: /usr/bin/python2.7: bad interpreter: No such file or directory 

如何找到點子正確的蟒蛇路徑?


$ which python 
/c/cygwin/bin/python 
+0

當你輸入'$ which python'時,你會看到什麼? – JacobIRR

+0

啊,這個重複,據我所知:http://stackoverflow.com/questions/31768128/pip-installation-usr-local-opt-python-bin-python2-7-bad-interpreter-no-such -f – JacobIRR

+0

[pip安裝/usr/local/opt/python/bin/python2.7:糟糕的解釋器:沒有這樣的文件或目錄]可能的重複(http://stackoverflow.com/questions/31768128/pip-installation- usr-local-opt-python-bin-python2-7-bad-interpreter-no-such-f) – JacobIRR

回答

0

畫中畫以某種方式使用你的Python不存在錯誤的道路加成。然而,有一個簡單的解決方法,您可以鍵入此指定要使用Python解釋:

$ /c/cygwin/bin/python -m pip install yourpackage 

這只是一個臨時的解決方法,解決它,嘗試從this問題的東西。

+0

它適用於我。非常感謝你! –

相關問題