Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

ImportError: No module named req #28

Open
ju2wheels opened this issue Apr 11, 2018 · 2 comments
Open

ImportError: No module named req #28

ju2wheels opened this issue Apr 11, 2018 · 2 comments

Comments

@ju2wheels
Copy link

Install error:

Collecting pyFG

  Downloading pyfg-0.50.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-GOjqC9/pyFG/setup.py", line 4, in <module>
        from pip.req import parse_requirements
    ImportError: No module named req

From upstream, you should not be depending on this pip internal: pypa/pip#3240

@pffs
Copy link

pffs commented May 1, 2018

Same issue, had to downgrade to pip9 in order to install.

Probably should rework the setup.py to not depend on pip internals, but changing the import to the following would resolve it:

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

I submitted a PR for it if you want to go that route.

ju2wheels added a commit to ju2wheels/docker-ansible that referenced this issue May 15, 2018
@RichardBotham
Copy link

All, since python2.0 is now deprecated will we get an update on 'pip.req' and 'pyfg' to work with python 3.x.?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants