pypa / packaging-problems

An issue tracker for the problems in packaging
149 stars 34 forks source link

pip cannot install daal4py==2021.7.1 on Windows for python 3.9 with claim that required python is 3.8 #631

Open tomashek opened 1 year ago

tomashek commented 1 year ago

Problem description

When attempting to install daal4py 2021.7.1 as follows, there is an error that a compatible dist cannot be found:

pip install daal4py==2021.7.1 ERROR: Could not find a version that satisfies the requirement daal4py==2021.7.1 (from versions: 2021.1, 2021.2.0, 2021.2.1, 2021.2.2, 2021.2.3, 2021.3.0, 2021.4.0, 2021.5.0, 2021.5.3, 2021.5.4, 2021.6.2, 2021.6.3, 2021.7.0) ERROR: No matching distribution found for daal4py==2021.7.1

However, a wheel of version 2021.7.1 for python 3.9 does exist in the index: https://files.pythonhosted.org/packages/09/e8/eba1b4b0fd16412de0c7d4496d89a28e389db357ad7b436e8bf1c6eda7c5/daal4py-2021.7.1-py39-none-win_amd64.whl

Adding -v shows the following for that wheel: C:\localdisk\work\tmtomash\Python39psf>pip install -v daal4py==2021.7.1 Using pip 22.0.4 from C:\localdisk\work\tmtomash\Python39psf\lib\site-packages\pip (python 3.9) .... Link requires a different Python (3.9.13 not in: '==3.8.'): https://files.pythonhosted.org/packages/09/e8/eba1b4b0fd16412de0c7d4496d89a28e389db357ad7b436e8bf1c6eda7c5/daal4py-2021.7.1-py39-none-win_amd64.whl#sha256=5f46ec0c78534ffc18460ebf2861439c63cb548690891e53692c7ce04abc414c (from https://pypi.org/simple/daal4py/) (requires-python:==3.8.) ERROR: Could not find a version that satisfies the requirement daal4py==2021.7.1 (from versions: 2021.1, 2021.2.0, 2021.2.1, 2021.2.2, 2021.2.3, 2021.3.0, 2021.4.0, 2021.5.0, 2021.5.3, 2021.5.4, 2021.6.2, 2021.6.3, 2021.7.0) ERROR: No matching distribution found for daal4py==2021.7.1

This shows that the index believes the wheel daal4py-2021.7.1-py39-none-win_amd64.whl requires python 3.8.*

However, if I download that wheel, extract it, and examine the METADATA file, it includes: Requires-Python: ==3.9.* Description-Content-Type: text/markdown License-File: LICENSE.txt Requires-Dist: daal (==2021.7.1) Requires-Dist: numpy (>=1.15)

Further, if I pre-download daal4py-2021.7.1-py39-none-win_amd64.whl and use:

pip install daal4py-2021.7.1-py39-none-win_amd64.whl The package is installed successfully.

From all this, it appears that the pypi index for daal4py 2021.7.1 is somehow corrupted. I also see that the index shows that daal4py 2021.7.1 packages for python 3.7 and 3.10 also appear to require python 3.8.* when their METADATA says otherwise.

Can the index be checked, and regenerated or fixed if it is not aligned with the packages?

tomashek commented 1 year ago

Reported in original issue: https://github.com/intel/scikit-learn-intelex/issues/1066

https://pypi.org/pypi/daal4py/2021.7.1/json

{
  "info": {
    "name": "daal4py",
    "package_url": "https://pypi.org/project/daal4py/",
    "platform": null,
    "project_url": "https://pypi.org/project/daal4py/",
    "release_url": "https://pypi.org/project/daal4py/2021.7.1/",
    "requires_dist": ["daal (==2021.7.1)", "numpy (>=1.15)"],
    "requires_python": "==3.8.*",
    "version": "2021.7.1"
  },
  "last_serial": 15695830,
  "urls": [
    {
      "filename": "daal4py-2021.7.1-py310-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl",
      "python_version": "py310",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py310-none-manylinux1_x86_64.whl",
      "python_version": "py310",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py310-none-win_amd64.whl",
      "python_version": "py310",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py37-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl",
      "python_version": "py37",
      "requires_python": "==3.8.*",
    },
    {
      "filename": "daal4py-2021.7.1-py37-none-manylinux1_x86_64.whl",
      "python_version": "py37",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py37-none-win_amd64.whl",
      "python_version": "py37",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py38-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl",
      "python_version": "py38",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py38-none-manylinux1_x86_64.whl",
      "python_version": "py38",
      "requires_python": "==3.8.*",
    },
    {
      "filename": "daal4py-2021.7.1-py38-none-win_amd64.whl",
      "python_version": "py38",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py39-none-macosx_10_15_x86_64.macosx_11_0_x86_64.whl",
      "python_version": "py39",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py39-none-manylinux1_x86_64.whl",
      "python_version": "py39",
      "requires_python": "==3.8.*"
    },
    {
      "filename": "daal4py-2021.7.1-py39-none-win_amd64.whl",
      "python_version": "py39",
      "requires_python": "==3.8.*"
    }
  ],
  "vulnerabilities": []
}
tomashek commented 1 year ago

The data in the index json file does not match the package metadata.