Skip to content
Permalink
Browse files

fix import of parse_requirements for pip v10

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 committed Apr 18, 2018
1 parent 58a76a8 commit 7784284d46f0e5ed427b8e4d0625954a0fb2a914
Showing with 4 additions and 1 deletion.
  1. +4 −1 setup.py
@@ -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)

0 comments on commit 7784284

Please sign in to comment.
You can’t perform that action at this time.