2017-04-10 319 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

它适用于我。非常感谢你! –

相关问题