I am installing tweepy, but I am running into an error about pip.req. I have pip installed, but for some reason pip.req still can't be found. I did a bunch of research online and the most I could find was some issue about incompatibilities between zapo (?) and python 2.7 causing the same error for some other user. The discussion was unclear about how to solve the problem, though. Thanks!
$ python2 setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from pip.req import parse_requirements
ImportError: No module named pip.req
This is happening lately because of a change in pip 10.
The fix is pretty easy. You probably have something like:
from pip.req import parse_requirements
Change that to something like:
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
That should do it.