Skip to content

Pip 10 compatibility #4

@MPr0pre

Description

@MPr0pre

When trying to install m2core with pip 10 :

Collecting m2core
  Using cached https://files.pythonhosted.org/packages/f4/12/67bc36ab49a9502af47e2191e9cf11f0afef8e2c0cde6e9630eee8806fa2/m2core-1.0.10.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qiwbzrk1/m2core/setup.py", line 3, in <module>
        from pip.req import parse_requirements
    ModuleNotFoundError: No module named 'pip.req'

It seems that the problem can be solve by replacing in setup.py :

from pip.req import parse_requirements

by

try: # for pip >= 10
    from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
    from pip.req import parse_requirements

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions