Pip cannot find lxml 4.4.1 even though it exists


Someone recently submitted a PR to my project that added a new dependency


lxml 4.4.1 was released on August 11th, 2019. and is the latest release in PyPI.

But, pip in Travis claims that lxml 4.4.0 is the latest available:

No matching distribution found for lxml>=4.4.1 (from -r requirements.txt (line 32))

What is going wrong?

I don’t know how pip looks for files, but in

I don’t see any files of type *.py2.py3-none-any.whl, which seems to be what most other dependencies seem to resolve to.

Do these requirements resolve correctly on your machine?

Yes. lxml 4.4.1 installs correctly on my systems.

As a workaround for now I have adjusted the requirement to lxml>=4.4.0 which will work with Travis, but allow other systems to install the latest version.

You are using Python 3.4 . As you can see in the list of files, there’s no wheel for Python 3.4. There is a source package but it also requires Python 3.5+ as you will see if you check out its setup.py. So even if you somehow get this version, you won’t be able to install it anyway.

As for why it doesn’t even see 4.4.1, my guess is either the older version of pip that is preinstalled for 3.4 cannot work with the new PyPI API (Pip has dropped 3.4 support, too) and you are looking at some kind of old mirror, or because that version’s metadata says (as per the same page) Requires: Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*.

You can make Pip trace files that it considers with -vvv if you really want to know. But the gist of the matter is that 3.4 support is actively being dropped and you are witnessing the fallout of that.
In particular, you have to migrate to 3.5+ if you wish to use that new lxml version.