Why can't I download the latest version of my package from pip on windows?

Viewed 99

As per the docs and PEP425, I have created three pip wheels (one for each windows, linux and mac, with platform specific binaries).

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        27/11/2020     15:08        3099789 pyomexmeta-1.1.20-cp38-cp38-macosx_10_15_x86_64.whl
-a----        27/11/2020     15:08        5128081 pyomexmeta-1.1.20-cp38-cp38-manylinux1_x86_64.whl
-a----        27/11/2020     15:08        2682188 pyomexmeta-1.1.20-cp38-cp38-win_amd64.whl

Then I uploaded to pypi using

twine upload *

The linux version works perfectly:

pip install pyomexmeta==1.1.20 

but when I try the same command on windows I get

(base) PS C:\x> pip install pyomexmeta==1.1.20
ERROR: Could not find a version that satisfies the requirement pyomexmeta==1.1.20 (from versions: 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 1.1.11, 1.1.12, 1.1.13, 1.1.14, 1.1.15, 1.1.16, 1.1.17)
ERROR: No matching distribution found for pyomexmeta==1.1.20

Looking at the pypi listing for my package shows me that the file I want is there yet it is not being downloaded. My only thought is that the platform tag must be wrong. However PEP425 says

The platform tag is simply distutils.util.get_platform() with all hyphens - and periods . replaced with underscore _.

so:

In [7]: from distutils import util
In [8]: util.get_platform()
Out[8]: 'win-amd64'

So why can I not download pyomexmeta-1.1.20 from pip?

Response to comments

(base) PS D:\bcftools> pip --version
pip 19.3.1 from C:\Miniconda\lib\site-packages\pip (python 3.7)

Updating pip is a good idea, but alas it does not help me here:

(base) PS D:\bcftools> C:\Miniconda\python.exe -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d396a433/pip-20.2.4-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.3.1
    Uninstalling pip-19.3.1:
      Successfully uninstalled pip-19.3.1
Successfully installed pip-20.2.4
(base) PS D:\bcftools> pip install pyomexmeta==1.1.20
ERROR: Could not find a version that satisfies the requirement pyomexmeta==1.1.20 (from versions: 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 1.1.11, 1.1.12, 1.1.13, 1.1.14, 1.1.15, 1.1.16, 1.1.17)
ERROR: No matching distribution found for pyomexmeta==1.1.20```

1 Answers

pip --version shows it's for Python 3.7. Your wheels are for Python 3.8. To install them you need pip from Python 3.8. Either

pip3.8 install pyomexmeta==1.1.20

or

python3.8 -m pip install pyomexmeta==1.1.20

PS. I must admit I don't know how to call this in Windows. Never used it.

PPS. From the @Doyousketch2 comment:

py -3.8 -m pip install pyomexmeta==1.1.20
Related