mattloper / chumpy

MIT License
195 stars 118 forks source link

Installation broken with pip 10 #20

Closed luser closed 4 years ago

luser commented 6 years ago

I had updated to pip 10.0.1 (to get rid of pip's update nag message), and then while trying to install a package that required chumpy its setup.py failed:

Collecting chumpy (from -r requirements.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/61/61/dc4e134b39674ecdd12a68139d2b82c4f9514133e023c070c973afced53a/chumpy-0.67.5.tar.gz (47kB)
    100% |████████████████████████████████| 51kB 3.9MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ERtEwy/chumpy/setup.py", line 8, in <module>
        from pip.req import parse_requirements
    ImportError: No module named req

[This stackoverflow answer(https://stackoverflow.com/a/49867265/69326) has a suggested fix.

BenjaminAllain commented 6 years ago

A (hotfix) pull request (#18) has been submitted for this issue.

kaisark commented 6 years ago

This is happening lately because of a change in pip 10. StackOverFlow

setup.py: "from pip.req import parse_requirements"

Change setup.py to something like:

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

paulmelnikow commented 6 years ago

This was addressed in #18.

paulmelnikow commented 4 years ago

Hey @mattloper, this can be closed.