ImportError: No module named 'pip.req'
See original GitHub issueSteps to reproduce
pip install py-mini-racer
Expected behavior
install !
Actual behavior
setup.py", line 12, in <module> from pip.req import parse_requirements ImportError: No module named ‘pip.req’
System configuration
Python version: python 3.5 pip 10.0.1
solution
Seems to be an incompatibility with new version of pip (>=10) https://stackoverflow.com/a/49867265/1619521
so have to change
from pip.req import parse_requirements
to
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
No module named pip.req - python - Stack Overflow
This is happening lately because of a change in pip 10. The fix is pretty easy. You probably have something like: from pip.req...
Read more >ImportError: No module named 'pip.req' · Issue #282 - GitHub
Flask-Ask is using pip.req module stuff which means you need pip <10.0.0 to install the packages.
Read more >[Fixed] ModuleNotFoundError: No module named 'pip' - Finxter
How to Fix “ModuleNotFoundError: No module named 'pip'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >No module named req | bench init unable to install version ...
I am running bench version 4.1.0 - installed with frappe user & production mode on Ubuntu 14.04 LTS $ pip -V pip 9.0.3...
Read more >Pip is not working: ImportError: No module named 'pip._internal'
It's a permissions problem on that directory, but it's better to reset in these circumstances I believe, you can always easily reinstall ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Workaround : install previous version of pip. Think this would work.
pip install pip==9.0.3
Le mar. 8 mai 2018 à 16:47, bootcher007 notifications@github.com a écrit :
Hello, In my centos 8, there is 19.3.1 version of pip. An I had this pip.req problem. To solve this, I installed pip 9 version and my problem fixed.
But there is so many version range from 9 upto 19… Do you think that there is another way in newer version of pip to solve this pip.req problem?