pip 安装 ruff 报错:The only supported Content-Types are application/vnd.pypi.simple.v1+json ?

─➤  pip install ruff -i https://mirror.baidu.com/pypi/simple                                                                                                                                                                                                                                     2 ↵
Looking in indexes: https://mirror.baidu.com/pypi/simple
Requirement already satisfied: ruff in /home/pon/.local/share/virtualenvs/image_vector-VLcefWib/lib/python3.10/site-packages (0.1.15)
WARNING: Skipping page https://mirror.baidu.com/pypi/simple/pip/ because the GET request got Content-Type: application/octet-stream. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html
─➤  pip --version                                           
pip 23.3.1

why?

阅读 2.1k
2 个回答

感觉是百度服务有问题?

image.png

换其他源, 最近一直用的清华源, 很稳定:

pip install ruff -i https://pypi.tuna.tsinghua.edu.cn/simple/

Output:

 rose: prometheus_grafana on main [ test-py3.12 3.12.1] ❯ pip install ruff -i https://pypi.tuna.tsinghua.edu.cn/simple/
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting ruff
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d8/4e/6fd32ebd0a09f25ed9911b77c5273b7a6b3b50a78d6ed0508d66a24398b8/ruff-0.4.10-py3-none-win_amd64.whl (8.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.5/8.5 MB 1.3 MB/s eta 0:00:00
Installing collected packages: ruff
Successfully installed ruff-0.4.10

[notice] A new release of pip is available: 23.3.1 -> 24.1
[notice] To update, run: python.exe -m pip install --upgrade pip
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题