Description
- pip version: 21.0.1
- Python version: 3.6 (but 3.7 and 3.8 have the same problem)
- Operating system: Linux (Debian buster docker image)
PIP 21.0.1 sometimes produces wrong error about conflicts , and it produces different (correct!) error when -vvvv
options are added.
This problem originated with apache/airflow#15463 (you can see history of it there). We have quite complex dependencies in Airlfow and we are still recommending people to install airflow with PIP 20.2.4, but we are hoping to get rid of that limitation, one problem however was a very strange one and we did not have time to look at it - but when I looked today I realized that the error printed by PIP was misleading (as I could not see the reason for the original error).
I believe PIP instead of pyarrow
reports google-cloud-bigquery-storage
as having a problem. Looks like instead of printing the actual dependency that has a problem, it prints the "sibling" of that dependency (or smth like that).
It is very easily reproducible:
- Run:
pip install apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt
You should get an error:
ERROR: Could not find a version that satisfies the requirement google-cloud-bigquery-storage<2.0.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas])
- Run
pip install -vvvv apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt
You should get an error:
ERROR: Could not find a version that satisfies the requirement pyarrow<2.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas])
ERROR: No matching distribution found for pyarrow<2.0dev,>=1.0.0; extra == "bqstorage"
I believe in both cases we ONLY have problem with pyarrow
, and it is misreported without the -vvvv
flag. Looks like instead of actual dependency that is wrong (pyarrow
), the sibling of that dependency (google-cloud-bigquery-storage
) is printed out by PIP. Note that other than the dependency - those are the very same limits which are problematic (<2.0.0dev,>=1.0.0; extra == "bqstorage").
I also could not find any other packages from those being installed where google-cloud-bigquery-storage
would be limited to <2.0.0dev,>=1.0.0
- that's why I think this is a bug in PIP.
Gists with the outputs to compare
pip install apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt
:
Here: https://gist.github.com/potiuk/04f6127469a709e3e47be7585c9a863c
pip install -vvvv apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt
:
https://gist.github.com/potiuk/17a3d591fb091bdd8a0e213f49b6b0af
I might be wrong, of course, but it looks like this.
UPDATE:
I run it with -vv
and it fails with the 'google-cloud-bigquery-storage` error:
https://gist.github.com/potiuk/2f9af6a8eaac7ea393fd1f9fe64361c7
The -v
and -vvv
both fail with pyarrow
error.
In neither of those I can find where the google-cloud-bigquery-storage<2.0.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas])
comes from :(.