Skip to content

Installation fails for pip >= 10.0 #2

@jpweytjens

Description

@jpweytjens

Description

The setup.py script uses the pip commands req and download that since pip version 10.0 have been moved to the _internale api of pip. As a consequence, the install script breaks.

Output

Traceback (most recent call last):
  File "setup.py", line 24, in <module>
    from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'

To reproduce

Run python setup.py develop with pip >= 10.0

Temporary workaround

The combination of

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

and

try: # for pip >= 10
    install_reqs = parse_requirements('./requirements.txt', session=pip.internal_.download.PipSession())
except ImportError: # for pip <= 9.0.3
    install_reqs = parse_requirements('./requirements.txt', session=pip.download.PipSession())

are a non recommended way to make the setup script work for now. The recommended way is documented here and here.

Package dependencies

Labutils requires tidyextractors which suffers from the same problem. Lastly, tidyextractors depends on tweepy which fails to install with python >= 3.7.0. A workaround for that exists.

Tasks

  • Update labutil's setup.py for use with pip 10.0
  • Update tidyextractors's setup.py for use with pip 10.0
  • Add supported versions of pip and python in README.rst

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions