From 94d64c89e5143f78136f964ea02cd7acc95d60fc Mon Sep 17 00:00:00 2001 From: mirror Date: Wed, 11 Sep 2024 16:36:07 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Maca=E4=BB=93=E5=BA=93=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=B7=A5=E5=85=B7=E5=B8=AE=E5=8A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...%A8%E5%B7%A5%E5%85%B7%E5%B8%AE%E5%8A%A9.md | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Maca%E4%BB%93%E5%BA%93%E4%BD%BF%E7%94%A8%E5%B7%A5%E5%85%B7%E5%B8%AE%E5%8A%A9.md b/Maca%E4%BB%93%E5%BA%93%E4%BD%BF%E7%94%A8%E5%B7%A5%E5%85%B7%E5%B8%AE%E5%8A%A9.md index 95102af..eb002ed 100644 --- a/Maca%E4%BB%93%E5%BA%93%E4%BD%BF%E7%94%A8%E5%B7%A5%E5%85%B7%E5%B8%AE%E5%8A%A9.md +++ b/Maca%E4%BB%93%E5%BA%93%E4%BD%BF%E7%94%A8%E5%B7%A5%E5%85%B7%E5%B8%AE%E5%8A%A9.md @@ -17,8 +17,29 @@ yum install -- 安装指定版本 ### 3.PYPI ``` -pip search 命令在较新的 pip 版本中已经被弃用了,使用 pip install ==,在"=="后面留空,这样 pip 会显示所有匹配的版本,而不会实际安装,做了第三方源代理,会列出公司匹配包和第三方源包,区分公司包名称:'2.0.0+mc2.23.0.23' -pip install == --extra-index-url=https://mirror.metax-tech.com/maca-pypi/simple/ --trusted-host https://mirror.metax-tech.com +1. pip 21.0 及更早版本:在 pip 21.0 及之前的版本,可以使用pip install == 方式触发错误并列出包的所有可用版本 +pip install triton== -i https://mirror.metax-tech.com/maca-pypi/simple --trusted-host mirror.metax-tech.com +``` +``` +2.pip 24.0 之后版本:在 pip 24.0 及之后的版本中,对 == 这种语法的处理变得更严格了。如果你只输入 == 而不指定具体的版本号,pip 会给出 "invalid requirement" 的错误,而不会再列出可用版本。因此,使用 pip install == 来列出版本在 pip 24.0 之后不再适用。 +``` +``` +3. 使用 pip index versions 命令:从 pip 21.0 之后开始,pip 引入了一个实验性的命令 pip index versions,用于列出某个包的所有版本。 +pip index versions triton -i https://mirror.metax-tech.com/maca-pypi/simple --trusted-host mirror.metax-tech.com +``` + +``` +4.在使用 `pip install triton==` 和 `pip index versions` 命令查看包版本时,用户可能会遇到根据系统 Python 版本不同,能够搜索到的包版本也不同的情况。例如: + +- **Python 3.8** 系统环境:只能搜索到与 3.8 相关的包版本。 +- **Python 3.10** 系统环境:只能搜索到与 3.10 相关的包版本。 + +但当系统环境为 **Python 3.7** 或 **Python 3.9**或 **Python 3.11** 高于低于python3.8和python10 时,执行 `pip install triton==` 和`pip index versions triton` 命令可能会出现以下错误: +could not find a version that satisfies the requirement == +``` + +``` +5.考虑到maca pypi包在安装过程中依赖第三方源,https://mirror.metax-tech.com/maca-pypi/simple代理了清华源和阿里源,当`pip install triton==` 和 `pip index versions triton` 包名和第三方源包名相同,区别公司包版本:’2.0.0+mc2.23.0.23,2.1.2+metax2.24.05‘ ``` \ No newline at end of file