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

pip install fails with python 3.8 #111

Open
o-smirnov opened this issue Nov 17, 2021 · 3 comments
Open

pip install fails with python 3.8 #111

o-smirnov opened this issue Nov 17, 2021 · 3 comments

Comments

@o-smirnov
Copy link
Contributor

@gijzelaerr @Athanaseus advice needed. I can't understand if this is an Oleg brain bug or a pip bug, or just normal life.

My current dev branch (and master, for all I know) fails to pip install -e. The error occurs when installing https://github.com/ratt-ru/radiopadre/blob/b1.2.x/requirements.txt:

Exception: Error retrieving astropy-helpers from PyPI:
ContextualVersionConflict(pyparsing 3.0.6 (/users/oms/.radiopadre/venv/lib/python3.8/site-packages), Requirement.parse('pyparsing<3,>=2.0.2'), {'packaging'})

I can work around it by adding pyparsing<3 to the requirements. But I don't understand why I need to be doing this ritual dance. As far as I can tell:

  • I don't need pyparsing and I'd really rather not know what it is!

  • one of my dependency packages (call it X) requires pyparsing, which is at version 3.0.6 currently, this is cheerfully pulled in

  • another dependency package (call it Y) requires packaging, which is also pulled in, but it has a specific pyparsing<3 dependency. So it says sorry, I can't deal with this shit

  • if I explicitly add pyparsing<3 to my dependencies, both X and Y are happy.

But why do I need to worry about the specific version of a dependency of a dependency? Shouldn't pip be able to work out this solution automatically? Or am I doing something wrong here?

@Mulan-94
Copy link
Collaborator

@o-smirnov I've met this issue with ragavi my resort has been using pip with --use-deprecated=legacy-resolver but this:
https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020 can shed more light

@o-smirnov
Copy link
Contributor Author

Thanks @Mulan-94, that put me on the right track... but actually, turns out pip install -U pip setuptools is the answer, which I really ought to have known by now! So it's "Oleg brain bug" I guess...

@gijzelaerr
Copy link
Member

wanted to say the same thing as @Mulan-94 , recent pip comes with a stricter dep solver, which breaks things that worked before. Maybe the latest latest pip has an even better dep solver that solves your issue.

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

No branches or pull requests

3 participants