按照docs和PEP425,我创建了三个pip wheel(每个windows,linux和mac带有一个平台特定的二进制文件)。
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
然后我使用上传到pypitwine upload *
linux版本完美运行:pip install pyomexmeta==1.1.20
但是当我在Windows上尝试相同的命令时(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
查看pypi listing for my package,向我显示我想要的文件在那里,但尚未下载。我唯一的想法是平台标签一定是错误的。但是PEP425说The platform tag is simply distutils.util.get_platform() with all hyphens - and periods . replaced with underscore _.
所以:
In [7]: from distutils import util
In [8]: util.get_platform()
Out[8]: 'win-amd64'
那为什么我不能从pip下载pyomexmeta-1.1.20?对评论的回应
(base) PS D:\bcftools> pip --version
pip 19.3.1 from C:\Miniconda\lib\site-packages\pip (python 3.7)
更新pip是个好主意,但可惜这里没有帮助我:(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```
最佳答案
pip --version
显示它适用于Python 3.7。您的轮子适用于Python 3.8。要安装它们,您需要Python 3.8中的pip
。任何一个
pip3.8 install pyomexmeta==1.1.20
或者python3.8 -m pip install pyomexmeta==1.1.20
PS。我必须承认我不知道如何在Windows中称呼它。没用过。PPS。来自@ Doyousketch2注释:
py -3.8 -m pip install pyomexmeta==1.1.20
关于python - 为什么我不能从Windows上的pip下载我的软件包的最新版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65040558/