[英]How to set python path with git bash in windows?
Using Git Bash on Windows 10. 在Windows 10上使用Git Bash。
python version: 2.7.12 python版本:2.7.12
When run pip
, it shows: 运行
pip
,它显示:
$ pip
bash: /c/cygwin/bin/pip: /usr/bin/python2.7: bad interpreter: No such file or directory
How to find the right python path with pip? 如何使用pip找到正确的python路径?
$ which python
/c/cygwin/bin/python
Your pip is somehow using the wrong path for your python that doesn't exist. 您的点以某种方式使用了不存在的python错误路径。 However, there is a simple workaround, you can type this to specify the python interpreter you want to use:
但是,有一个简单的解决方法,您可以键入以下内容以指定要使用的python解释器:
$ /c/cygwin/bin/python -m pip install yourpackage
This is only a temporary workaround, to fix it, try something from this question. 这只是一个临时解决方法,要修复它,请尝试解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.