2

Using Git Bash on Windows 10.

python version: 2.7.12

When run pip, it shows:

$ 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?


Addition

$ which python
/c/cygwin/bin/python
cloud_cloud
  • 1,921
  • 4
  • 16
  • 30
  • what do you see when you type `$ which python` ? – JacobIRR Apr 10 '17 at 05:54
  • Ah, duplicate of this as far as I can tell: http://stackoverflow.com/questions/31768128/pip-installation-usr-local-opt-python-bin-python2-7-bad-interpreter-no-such-f – JacobIRR Apr 10 '17 at 06:09
  • Possible duplicate of [pip installation /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory](http://stackoverflow.com/questions/31768128/pip-installation-usr-local-opt-python-bin-python2-7-bad-interpreter-no-such-f) – JacobIRR Apr 10 '17 at 06:10
  • @JacoblRR That's on mac, but this is on windows. They are very different. – cloud_cloud Apr 10 '17 at 06:19

1 Answers1

0

Your pip is somehow using the wrong path for your python that doesn't exist. However, there is a simple workaround, you can type this to specify the python interpreter you want to use:

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

This is only a temporary workaround, to fix it, try something from this question.

Community
  • 1
  • 1
Taku
  • 31,927
  • 11
  • 74
  • 85