Failure to install sbpy, and incomprehensible error message
See original GitHub issueMy very first attempt to use the new resolver has left me highly deflated. Here are my steps:
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip ## => pip 20.2.3
pip install --use-feature=2020-resolver sbpy
...
ERROR: Requested astroquery>=0.4.1.dev0 from file:///Users/magnus/Library/Caches/pip/wheels/87/91/d5/1934f2a17c67e3e0c39b07b7cf01acc5d53a5fde7ceee37739/astroquery-0.4.2.dev0-py3-none-any.whl (from sbpy) has different version in metadata: '0.4.2.dev0'
Sorry, I just don’t get this message (and find it rather frustrating). You might be so close to the code that it’s hard for you to see that ordinary users find this message really weird/opaque/confusing. Having read it like 10 times, I’m left to believe that one package wants astroquery greater than 0.4.1.dev0, and another package wants astroquery equal to 0.4.2.dev0 (which sounds like it is indeed greater than 0.4.1.dev0, so what’s the problem?).
So it seems to me like there is no conflict here. And if there is a conflict, then the error message reads so unclearly that I would suggest reworking how you signal problems to the user.
In fact, since this new resolver is obviously going to be a very big deal, and apt to frustrate a lot of users and inundate your github issues box, I would suggest making the printout of such errors much more user friendly. This is the sort of message I would expect/hope for:
Error: the new pip resolver has encountered an apparent conflict between the following dependencies:
- \RED astroquery>=0.4.1.dev0 \WHITE required by sbpy
- \RED astroquery==0.4.2.dev0 \WHITE required by xyz, required by abc, required by ...
You might want to consider contacting the admin of these packages... blah blah
I’m using python3 -V 3.8.5.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
@uranusjr I think you might have misread the error? The filename in the user’s cache is
astroquery-0.4.2.dev0-py3-none-any.whl
Also, @MagnusBrzenk, I can not reproduce your issue. Here’s what I tried:
In a fresh virtualenv, using pip 20.2.3, I
pip install
’edastroquery
and got version 0.4.1. During installation, it told me that it had compiled the package into a binary file (a wheel) for later re-usage and stored it:So I navigated to that wheel (the
.whl
file), copied it to another directory, it had0.4.1
in the filename, and when I ranwheel unpack
on that file and looked at theMETADATA
file, I found it saidVersion: 0.4.1
. Which made me realize that I think @MagnusBrzenk is dealing with a version that’s not the stable release on PyPI.I figured that @MagnusBrzenk perhaps installed
astroquery
at some point in the past few months by installing a pre-release? I see that four months ago astroquery changed its version insetup.py
to “VERSION = ‘0.4.2.dev’” and has published 20+ prereleases, but many of the version numbers are something other than0.4.2.dev0
, such as0.4.2.dev6256
.So I upgraded to one of the dev releases:
Then I tried installing
sbpy
:So, @MagnusBrzenk, to help us reproduce this: could you tell us which
astroquery
pre-release you have installed, so that we can look in the wheel for that package, inspect theMETADATA
file, and investigate further?We’ve since handled this edge case, replacing the error with a warning.