Skip to content

Commit

Permalink
fix import of parse_requirements for pip v10
Browse files Browse the repository at this point in the history
currently with the latest pip, setup fails with "ImportError: No module named req"
This fix is via: https://stackoverflow.com/questions/25192794/no-module-named-pip-req
  • Loading branch information
jimmyland authored Apr 18, 2018
1 parent 58a76a8 commit 7784284
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"""

from distutils.core import setup
from pip.req import parse_requirements
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
from runpy import run_path

install_reqs = parse_requirements('requirements.txt', session=False)
Expand Down

0 comments on commit 7784284

Please sign in to comment.