question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named 'pip.req'

See original GitHub issue

Steps 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
doom-frcommented, May 8, 2018

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 :

Hi, I have same problem will it be fixed soon? Is there any work around?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sqreen/PyMiniRacer/issues/50#issuecomment-387428014, or mute the thread https://github.com/notifications/unsubscribe-auth/AHcpybZlhAPWTQ9npMBNcgofKs5aM2VTks5twa_mgaJpZM4Tso_0 .

3reactions
mahmutaydin1commented, Oct 18, 2019

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found