-
Notifications
You must be signed in to change notification settings - Fork 23
Description
when I use pip install python-kafka-logging, it alway get error like:
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "", line 1, in
File "C:\Local\Temp\pip-install-wopvdc79\python-kafka-logging\setup.py", line 6, in
from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Local\Temp\pip-install-wopvdc79\python-kafka-logging
I tried to update my pip, but no use.
Finally, i download the projoect, and change the 'setup.py' in line 6:
from "from pip.req import parse_requirements" to:
"try:
from pip._internal.req import parse_requirements
except ImportError:
from pip.req import parse_requirements
"
That can compatible with different pip versions.