Skip to content

Commit

Permalink
Fix Pip 10.0 error: ModuleNotFoundError: No module named 'pip.req'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekmo committed Apr 15, 2018
1 parent f8396ff commit 4372e65
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
"""The setup script."""
import os
import uuid

import pip
import sys

from setuptools import setup, find_packages
from pip.req import parse_requirements
from distutils.version import LooseVersion

if LooseVersion(pip.__version__) >= "10.0.0":
from pip._internal.req import parse_requirements
else:
from pip.req import parse_requirements


__dir__ = os.path.abspath(os.path.dirname(__file__))
scripts_path = os.path.join(__dir__, 'scripts')
Expand Down

0 comments on commit 4372e65

Please sign in to comment.