Search code examples
pythonpipversionpypi

pip doesn't install the lastest vertion of a package


I'm trying to install the latest version (0.0.7) of the package https://pypi.org/project/revolutionhtl/ using the command

pip install revolutionhtl

After running this command, the installed version is 0.0.4. Bellow you can see the output of the command, please note that the third line says Using cached revolutionhtl-0.0.7-py3-none-any.whl (29 kB), so it seems that pip detects version 0.0.7, nevertheless, it is not installed.

Defaulting to user installation because normal site-packages is not writeable
Collecting revolutionhtl
  Using cached revolutionhtl-0.0.7-py3-none-any.whl (29 kB)
Collecting networkx>=2.8
  Using cached networkx-3.0-py3-none-any.whl (2.0 MB)
Collecting numpy>=1.22.3
  Using cached numpy-1.24.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Requirement already satisfied: tqdm>=4.63.0 in /usr/lib/python3/dist-packages (from revolutionhtl) (4.64.0)
Collecting pandas>=1.4.2
  Using cached pandas-1.5.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.1 MB)
Collecting revolutionhtl
  Using cached revolutionhtl-0.0.6-py3-none-any.whl (29 kB)
  Using cached revolutionhtl-0.0.5-py3-none-any.whl (29 kB)
  Using cached revolutionhtl-0.0.4-py3-none-any.whl (29 kB)
Installing collected packages: revolutionhtl
Successfully installed revolutionhtl-0.0.4

Also, I tried with the command pip install revolutionhtl==0.0.7, obtaining as output:

Defaulting to user installation because normal site-packages is not writeable
Collecting revolutionhtl==0.0.7
  Using cached revolutionhtl-0.0.7-py3-none-any.whl (29 kB)
ERROR: Could not find a version that satisfies the requirement itertools (from revolutionhtl) (from versions: none)
ERROR: No matching distribution found for itertools

What should I do to install version 0.0.7?

My python version: 3.10.9.

$ pip --version
pip 22.3 from /usr/lib/python3/dist-packages/pip (python 3.10)

Since revolutionhtl requires python >= 3.7, the problem shouldn't be my python


Solution

  • I contacted the package creator. We saw that the problem was the dependency list of the package. The following was specified in the pyproject.toml file:

    dependencies = [
        "networkx >= 2.8",
        "pandas >= 1.4.2",
        "argparse >= 1.1",
        "os",
        "numpy >= 1.22.3",
        "tqdm >= 4.63.0",
        "itertools",
        "collections",
        ]
    

    After deleting argparse, os, itertools, and collections, the problem vanished. I guess this works because those packages are part of the python standard library, and then they don't appear in pypi.

    You can see the correction in this link, now I can download de latest version (0.0.8) using pip install revolutionhtl.