tuna / issues

Code Unrelated Issues
361 stars 28 forks source link

PyPI 镜像安装特定仓库时提示 Could not find a version that satisfies the requirement #1980

Closed SadPencil closed 3 months ago

SadPencil commented 3 months ago

先决条件 (Prerequisites)

发生了什么(What happened)

设置 PyPI 镜像站为 TUNA (或者南大;其他镜像站未测试)时,安装包 aiohttp-fast-zlib==0.1.0 报错:

(venv) ubuntu@homeassistant:~/ha-core/homeassistant$ pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Writing to /home/ubuntu/.config/pip/pip.conf
(venv) ubuntu@homeassistant:~/ha-core/homeassistant$ pip install aiohttp-fast-zlib==0.1.0
Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
ERROR: Could not find a version that satisfies the requirement aiohttp-fast-zlib==0.1.0 (from versions: none)
ERROR: No matching distribution found for aiohttp-fast-zlib==0.1.0

期望的现象(What you expected to happen)

不设置 PyPI 镜像,使用官方 PyPI 仓库时可以顺利安装:

(venv) ubuntu@homeassistant:~/ha-core/homeassistant$ pip config unset global.index-url
Writing to /home/ubuntu/.config/pip/pip.conf
(venv) ubuntu@homeassistant:~/ha-core/homeassistant$ pip install aiohttp-fast-zlib==0.1.0
Collecting aiohttp-fast-zlib==0.1.0
  Using cached aiohttp_fast_zlib-0.1.0-py3-none-any.whl.metadata (5.6 kB)
Requirement already satisfied: aiohttp>=3.9.0 in /home/ubuntu/ha-core/venv/lib/python3.12/site-packages (from aiohttp-fast-zlib==0.1.0) (3.9.5)
Requirement already satisfied: aiosignal>=1.1.2 in /home/ubuntu/ha-core/venv/lib/python3.12/site-packages (from aiohttp>=3.9.0->aiohttp-fast-zlib==0.1.0) (1.3.1)
Requirement already satisfied: attrs>=17.3.0 in /home/ubuntu/ha-core/venv/lib/python3.12/site-packages (from aiohttp>=3.9.0->aiohttp-fast-zlib==0.1.0) (23.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in /home/ubuntu/ha-core/venv/lib/python3.12/site-packages (from aiohttp>=3.9.0->aiohttp-fast-zlib==0.1.0) (1.4.1)
Requirement already satisfied: multidict<7.0,>=4.5 in /home/ubuntu/ha-core/venv/lib/python3.12/site-packages (from aiohttp>=3.9.0->aiohttp-fast-zlib==0.1.0) (6.0.5)
Requirement already satisfied: yarl<2.0,>=1.0 in /home/ubuntu/ha-core/venv/lib/python3.12/site-packages (from aiohttp>=3.9.0->aiohttp-fast-zlib==0.1.0) (1.9.4)
Requirement already satisfied: idna>=2.0 in /home/ubuntu/ha-core/venv/lib/python3.12/site-packages (from yarl<2.0,>=1.0->aiohttp>=3.9.0->aiohttp-fast-zlib==0.1.0) (3.7)
Using cached aiohttp_fast_zlib-0.1.0-py3-none-any.whl (8.2 kB)
Installing collected packages: aiohttp-fast-zlib
Successfully installed aiohttp-fast-zlib-0.1.0

如何重现此问题(How to reproduce it)

在任意 Python 环境下似乎都可以复现,使用 pip config (un)set global.index-urlpip install aiohttp-fast-zlib==0.1.0。具体命令在之前已给出。

已经测试的环境:

操作系统(OS Version)

Ubuntu 24.04, Windows 11, etc

浏览器(如果适用)(Browser version, if applicable)

N/A

其他环境(Other environments)

No response

其他需要说明的事项(Anything else we need to know)

https://pypi.org/project/aiohttp-fast-zlib/ Released: May 5, 2024

此包目前是 homeassistant 项目的依赖,且包名不以 nightly 结尾

shankerwangmiao commented 3 months ago

已经补充同步完毕。

JoJenH commented 3 months ago

经验证发现问题仍然存在

shankerwangmiao commented 3 months ago

请再试一次。