question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failure to install sbpy, and incomprehensible error message

See original GitHub issue

My 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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brainwanecommented, Oct 6, 2020

It seems like astroquery defines its version inconsistently. The error message means that the filename says it’s 0.4.1.dev0, but inside the file it says 0.4.2.dev0.

@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’ed astroquery 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:

Created wheel for astroquery: filename=astroquery-0.4.1-py3-none-any.whl size=3831872 sha256=f6c1449c93db0ec3b3d7f58a1123b9def1d7d4e8342bb0963bdcb14955a39503
  Stored in directory: /home/sumanah/.cache/pip/wheels/59/74/e3/a457b9b06b2cf6a0126f316459030ee535cfaa95a69bbcc36f

So I navigated to that wheel (the .whl file), copied it to another directory, it had 0.4.1 in the filename, and when I ran wheel unpack on that file and looked at the METADATA file, I found it said Version: 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 in setup.py to “VERSION = ‘0.4.2.dev’” and has published 20+ prereleases, but many of the version numbers are something other than 0.4.2.dev0, such as 0.4.2.dev6256.

So I upgraded to one of the dev releases:

$ pip install --upgrade astroquery==0.4.2.dev6287 
Collecting astroquery==0.4.2.dev6287
  Downloading astroquery-0.4.2.dev6287.tar.gz (4.7 MB)
     |████████████████████████████████| 4.7 MB 1.0 MB/s 
  WARNING: Requested astroquery==0.4.2.dev6287 from https://files.pythonhosted.org/packages/51/78/a65cbbbeda829ef28f9313ef7e410fa59018e9139f44c7cf0aeff29d76a7/astroquery-0.4.2.dev6287.tar.gz#sha256=5bc325aba92e5fb1e7aafb6ca9e904057b3c068aa61cda3022202919aec48fee, but installing version 0.4.2.dev0
.....
Building wheels for collected packages: astroquery, pyvo, mimeparse
  Building wheel for astroquery (setup.py) ... done
  Created wheel for astroquery: filename=astroquery-0.4.2.dev0-py3-none-any.whl size=3754590 sha256=1fbb24a6c071870e938363a7cd0745b21454fac1761596e30afa8c748374eae8
  Stored in directory: /home/sumanah/.cache/pip/wheels/8c/ef/48/0ed28b3a705d61bffb05ce8fa5092a6e10df56e1db0a0593ad

Then I tried installing sbpy:

$ pip install  --use-feature=2020-resolver sbpy
Collecting sbpy
...
Requirement already satisfied: astroquery>=0.4.1.dev0 in /home/sumanah/.virtualenvs/astropy-test/lib/python3.7/site-packages (from sbpy) (0.4.2.dev0)

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 the METADATA file, and investigate further?

0reactions
pradyunsgcommented, Oct 7, 2022

We’ve since handled this edge case, replacing the error with a warning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Having trouble in installing scanpy in python - Stack Overflow
@ellhe-blaster I have installed scanpy package using the command pip install scanpy , firstly it shows errors but now it generate the output ......
Read more >
Zeppelin install in Ambari fails with error: Nothing to do
Solved: This is a single node HDP (not sandbox). Installing Zeppelin on the same node using Ambari. Got this - 168713.
Read more >
Notes on a hitherto unknown exegetical, theological and ...
ong>Notes ong> on a hitherto rNKKOwx exegetical, ... Let vis add the statement, that the titleof the book is not always given, ...
Read more >
Full text of "A synopsis of criticisms - Internet Archive
29 Let it rest on the head of Joab, and on all his father's house; and let there not fail [Heb., be cut...
Read more >
MANZUR AL-DHAMARI'S - hebrew arabic
induce the Jews to return to their country', and his failure, whereupon ... on account of their paramount importance for our literature.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found