Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install with pip 20 #74

Closed
WickedShell opened this issue Apr 29, 2020 · 3 comments · Fixed by #75
Closed

Can't install with pip 20 #74

WickedShell opened this issue Apr 29, 2020 · 3 comments · Fixed by #75

Comments

@WickedShell
Copy link

With pip 20.1 installing fails due to the following error:

$ pip install edn_format
Collecting edn_format
  Downloading edn_format-0.7.1.tar.gz (18 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/runner/ardupilot/python3-env/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o3m17uee/edn-format/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o3m17uee/edn-format/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-z0lgf504
         cwd: /tmp/pip-install-o3m17uee/edn-format/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-o3m17uee/edn-format/setup.py", line 11, in <module>
        requirements = [str(ir.req) for ir in parse_requirements('requirements.txt', session=False)]
      File "/tmp/pip-install-o3m17uee/edn-format/setup.py", line 11, in <listcomp>
        requirements = [str(ir.req) for ir in parse_requirements('requirements.txt', session=False)]
    AttributeError: 'ParsedRequirement' object has no attribute 'req'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

It appears that parse_requirements changed such that the setup is now broken. I don't use python enough to be sure, but it appears that using this directly is generally not considered a good idea.

@swaroopch
Copy link
Owner

Thanks @WickedShell for informing us!
Unfortunately, I won't be able to look into this until the weekend.

bfontaine added a commit to bfontaine/edn_format that referenced this issue Apr 30, 2020
pip’s internal API is unsupported and may break anytime, like it just
did.

See: https://stackoverflow.com/a/49837302/735926

Fixes swaroopch#74.
@bfontaine
Copy link
Collaborator

Seems like pip’s internal API changed. I made a PR to read the requirements.txt file without relying on that API: #75

@WickedShell
Copy link
Author

Thanks for fixing it so rapidly!

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

Successfully merging a pull request may close this issue.

3 participants