解决No module named ‘triton‘的问题

问题描述:
在Windows系统中,pip install triton时会报错:

ERROR: Could not find a version that satisfies the requirement triton (from versions: none)
ERROR: No matching distribution found for triton

这是因为triton只支持Linux系统。需要安装Triton for Windows

简单方法

pip install cmake
pip install triton-2.0.0-cp310-cp310-win_amd64.whl

具体分析

项目的虚拟环境中进行。

根据GitHub中给的提示,需要输入下面命令:

pip install triton-2.0.0-cp310-cp310-win_amd64.whl

会报错,说找不到triton-2.0.0-cp310-cp310-win_amd64.whl

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'D:\\项目路径\\triton-2.0.0-cp310-cp310-win_amd64.whl'

说明要先把triton-2.0.0-cp310-cp310-win_amd64.whl下载到项目路径中。然后再

.\venv\Scripts\python.exe -m pip install triton-2.0.0-cp310-cp310-win_amd64.whl

发现又有报错:

WARNING: Requirement 'cmake-3.26.3-py2.py3-none-win_amd64.whl' looks like a filename, but the file does not exist
Processing d:\semantic_segmentation\sf-mamba\cmake-3.26.3-py2.py3-none-win_amd64.whl
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'D:\\项目路径\\cmake-3.26.3-py2.py3-none-win_amd64.whl'

说明需要安装CMake 3.26.3,输入命令,安装一下:

.\venv\Scripts\python.exe -m pip install cmake==3.26.3

现在再用下面的命令安装triton:

.\venv\Scripts\python.exe -m pip install triton-2.0.0-cp310-cp310-win_amd64.whl

可以安装Triton了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值