triton icon indicating copy to clipboard operation
triton copied to clipboard

Is Triton unable to install in python 3.10 versions?

Open debdip opened this issue 2 years ago • 60 comments

Hello I'm using python 3.10 version and getting error while run 'pip install triton'

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

I also download triton repository and try to install from source but didn't work.

anyone can help?

debdip avatar Jan 14 '23 16:01 debdip

@debdip

I have installed Triton successfully with python version 3.10 in Codespaces . image

can you try again because it seem the problem is not in the setup more like some issue with your particular setup

nishantsikarwar avatar Jan 16 '23 03:01 nishantsikarwar

Maybe it's with windows or the python version. image

debdip avatar Jan 16 '23 14:01 debdip

+1 pip just can't find the package, is there a link to whl package?

nikich340 avatar Jan 23 '23 12:01 nikich340

+1 cant install and also manually cant install. cmake error C:\sd\venv\Scripts\python.exe -m pip install -e c:\sd\triton\python

iqubik avatar Jan 23 '23 16:01 iqubik

same here, getting: subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j288']' returned non-zero exit status 2.

bettyballin avatar Jan 27 '23 16:01 bettyballin

windows is not supported you have to build yourself.

aliencaocao avatar Jan 29 '23 05:01 aliencaocao

Bulid is also not successful in windows 10 machine.

debdip avatar Jan 31 '23 13:01 debdip

same error

digits122 avatar Feb 09 '23 20:02 digits122

windows is not supported you have to build yourself.

any hint on how it is done? or a link to documentation about 'building' (from git I guess?)

Pirog17000 avatar Feb 15 '23 14:02 Pirog17000

Not just Windows. I have attempted to install on Mac.

Pip simply can not find Triton. I tried Python 3.8, 3,9, 3.10.

Nada. The company probably could publish clear non-erroneous documentation.

This: https://github.com/openai/triton/blob/main/docs/getting-started/installation.rst

Claims: You can install the latest stable release of Triton from pip:

pip install triton Binary wheels are available for CPython 3.6-3.9 and PyPy 3.6-3.7.

So do they exist?

RichardKatz avatar Apr 04 '23 20:04 RichardKatz

Note that lack of compatibility for Windows / MacOS is explicitly documented in README.md:

Compatibility
Supported Platforms:

Linux
Supported Hardware:

NVIDIA GPUs (Compute Capability 7.0+)
Under development: AMD GPUs, CPUs

You can see here https://pypi.org/project/triton/2.0.0.post1/#files that on linux 3.10 is there.

Apologies for the outdated installation.rst file. Our docs building job has been broken for a while, and we haven't had the resources to fix it yet.

ptillet avatar Apr 04 '23 20:04 ptillet

The Java world simply did not tolerate this kind of issue to just go on and on the way it has here. Here, they made the claim that they support a particular version of Python - but the reality is - they don't?

They only support it on "some" version on WSL?

RichardKatz avatar Apr 07 '23 20:04 RichardKatz

I don't understand the issue/drama here. Triton is only supported on Linux, as mentioned in README.md. PyPI page has wheels for Python 3.6 - 3.11 on Linux. We don't have any windows CI machine. We're not Java; we're a small team at OpenAI working on this project, and we have busy jobs working on compiler optimizations and stability improvements for LLMs. All the extra community management work is done in our free time. The project is open-source; if you think the documentation is inaccurate or the cibuildwheelcommand is wrong, you are free to submit a PR.

ptillet avatar Apr 07 '23 20:04 ptillet

Thanks for responding. Good explanation. And - I was able to do the build from source and make it work on Mac. The library loads up. So it's not wrong. It appears to work if we just follow the build instructions.

I appreciate the time you put into this. Thank you!

RichardKatz avatar Apr 07 '23 22:04 RichardKatz

Nice! Note that we have long-term plan to have Triton also work on Mac with Apple GPUs, but this will take time to materialize. But when the time comes, MacOS will be added as a supported platform.

ptillet avatar Apr 07 '23 22:04 ptillet

@ptillet Out of curiosity, what would be needed to get Triton to compile on macOS (for both x86_64 and arm64 platforms)? I saw that it was possible to build from source an x86 macOS machine but I've had no luck in getting it to work on arm64. I'm asking because I don't really know where to start looking for why it doesn't work. Also, I suppose this is a separate question, what would it take to get it to support MPS hardware on M1 Macs? If this is even a medium scale effort, I'd like to contribute here.

zrthxn avatar Apr 26 '23 17:04 zrthxn

image Same here (Ubuntu 18.04).

AntiMoron avatar May 01 '23 15:05 AntiMoron

Same problem with 18.04 and I don't get why Linux torch 2.0.0 mandates triton be installed, especially if triton is not available on Windows or Mac, per above discussion.

python38 -m pip install torch Collecting torch Using cached https://files.pythonhosted.org/packages/89/5a/0d017d8d45cc309f9de8e5b8edc9b6b204d8c47936a3f2b84cf01650cf98/torch-2.0.0-cp38-cp38-manylinux1_x86_64.whl Collecting nvidia-cuda-nvrtc-cu11==11.7.99; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/ef/25/922c5996aada6611b79b53985af7999fc629aee1d5d001b6a22431e18fec/nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl Collecting networkx (from torch) Using cached https://files.pythonhosted.org/packages/a8/05/9d4f9b78ead6b2661d6e8ea772e111fc4a9fbd866ad0c81906c11206b55e/networkx-3.1-py3-none-any.whl Collecting sympy (from torch) Using cached https://files.pythonhosted.org/packages/2d/49/a2d03101e2d28ad528968144831d506344418ef1cc04839acdbe185889c2/sympy-1.11.1-py3-none-any.whl Collecting nvidia-cudnn-cu11==8.5.0.96; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/dc/30/66d4347d6e864334da5bb1c7571305e501dcb11b9155971421bb7bb5315f/nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl Collecting jinja2 (from torch) Using cached https://files.pythonhosted.org/packages/bc/c3/f068337a370801f372f2f8f6bad74a5c140f6fda3d9de154052708dd3c65/Jinja2-3.1.2-py3-none-any.whl Collecting nvidia-cublas-cu11==11.10.3.66; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/ce/41/fdeb62b5437996e841d83d7d2714ca75b886547ee8017ee2fe6ea409d983/nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl Collecting nvidia-cusparse-cu11==11.7.4.91; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/ea/6f/6d032cc1bb7db88a989ddce3f4968419a7edeafda362847f42f614b1f845/nvidia_cusparse_cu11-11.7.4.91-py3-none-manylinux1_x86_64.whl Collecting nvidia-cuda-cupti-cu11==11.7.101; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/e6/9d/dd0cdcd800e642e3c82ee3b5987c751afd4f3fb9cc2752517f42c3bc6e49/nvidia_cuda_cupti_cu11-11.7.101-py3-none-manylinux1_x86_64.whl Collecting nvidia-nccl-cu11==2.14.3; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/55/92/914cdb650b6a5d1478f83148597a25e90ea37d739bd563c5096b0e8a5f43/nvidia_nccl_cu11-2.14.3-py3-none-manylinux1_x86_64.whl Collecting filelock (from torch) Using cached https://files.pythonhosted.org/packages/ad/73/b094a662ae05cdc4ec95bc54e434e307986a5de5960166b8161b7c1373ee/filelock-3.12.0-py3-none-any.whl Collecting nvidia-cuda-runtime-cu11==11.7.99; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/36/92/89cf558b514125d2ebd8344dd2f0533404b416486ff681d5434a5832a019/nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl Collecting nvidia-cufft-cu11==10.9.0.58; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/74/79/b912a77e38e41f15a0581a59f5c3548d1ddfdda3225936fb67c342719e7a/nvidia_cufft_cu11-10.9.0.58-py3-none-manylinux1_x86_64.whl Collecting nvidia-cusolver-cu11==11.4.0.1; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Using cached https://files.pythonhosted.org/packages/3e/77/66149e3153b19312fb782ea367f3f950123b93916a45538b573fe373570a/nvidia_cusolver_cu11-11.4.0.1-2-py3-none-manylinux1_x86_64.whl Collecting triton==2.0.0; platform_system == "Linux" and platform_machine == "x86_64" (from torch) Could not find a version that satisfies the requirement triton==2.0.0; platform_system == "Linux" and platform_machine == "x86_64" (from torch) (from versions: ) No matching distribution found for triton==2.0.0; platform_system == "Linux" and platform_machine == "x86_64" (from torch)

Temporary workaround - use torch 1.9 python38 -m pip install torch==1.9

codeisnotcode avatar May 07 '23 21:05 codeisnotcode

Try this.

pip install [https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl](https://oo.pe/https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl)

myungjunChae avatar Jul 06 '23 20:07 myungjunChae

ERROR: triton-2.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

jameswan avatar Jul 17 '23 08:07 jameswan

I managed to install triton successfully. Try upgrading pip and then run pip install triton.

kwonmha avatar Jul 18 '23 08:07 kwonmha

I managed to install triton successfully. Try upgrading pip and then run pip install triton.

Thanks! Ubuntu 18.04 Python3.8 Trying to install stable-diffusion-webui, works after upgrade pip by python3 -m pip install --upgrade pip

djanchew avatar Jul 20 '23 02:07 djanchew

Try this.

pip install [https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl](https://oo.pe/https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl)

Running pip install https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl

Installed Triton on my Windows PC and I am able to use the module in python now, working perfectly. Thanks very much!

privatedownloads avatar Jul 28 '23 16:07 privatedownloads

Try this.

pip install [https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl](https://oo.pe/https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl)

pip install https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl

works!!! Thank you!

LEXAdesigns avatar Aug 01 '23 05:08 LEXAdesigns

HELP!!! image

thanayut1750 avatar Aug 02 '23 16:08 thanayut1750

Same same... T_T

Windows 11 with Python 3.11.4 is currently not supported. I tried to build it myself but encountered more errors:

      running build_py
      running build_ext
      C:\Users\AndyX\AppData\Local\Temp\pip-build-env-b47ukrj_\overlay\Lib\site-packages\setuptools\command\editable_wheel.py:292: SetuptoolsDeprecationWarning: Customization incompatible with editable install
      !!

              ********************************************************************************
                              Traceback (most recent call last):
                File "C:\Users\AndyX\AppData\Local\Temp\pip-build-env-b47ukrj_\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 298, in _safely_run
                  return self.run_command(cmd_name)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "C:\Users\AndyX\AppData\Local\Temp\pip-build-env-b47ukrj_\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
                  self.distribution.run_command(command)
                File "C:\Users\AndyX\AppData\Local\Temp\pip-build-env-b47ukrj_\overlay\Lib\site-packages\setuptools\dist.py", line 1234, in run_command
                  super().run_command(command)
                File "C:\Users\AndyX\AppData\Local\Temp\pip-build-env-b47ukrj_\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
                  cmd_obj.run()
                File "<string>", line 157, in run
                File "C:\Users\AndyX\AppData\Local\Temp\pip-build-env-b47ukrj_\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
                  self.distribution.run_command(command)
                File "C:\Users\AndyX\AppData\Local\Temp\pip-build-env-b47ukrj_\overlay\Lib\site-packages\setuptools\dist.py", line 1234, in run_command
                  super().run_command(command)
                File "C:\Users\AndyX\AppData\Local\Temp\pip-build-env-b47ukrj_\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
                  cmd_obj.run()
                File "<string>", line 193, in run
                File "<string>", line 211, in build_extension
                File "<string>", line 109, in get_thirdparty_packages
                File "D:\Program Files\Python3\Lib\urllib\request.py", line 216, in urlopen
                  return opener.open(url, data, timeout)

..........................

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\Program Files\Python3\Lib\urllib\request.py", line 503, in open
          req = Request(fullurl, data)
                ^^^^^^^^^^^^^^^^^^^^^^
        File "D:\Program Files\Python3\Lib\urllib\request.py", line 322, in __init__
          self.full_url = url
          ^^^^^^^^^^^^^
        File "D:\Program Files\Python3\Lib\urllib\request.py", line 348, in full_url
          self._parse()
        File "D:\Program Files\Python3\Lib\urllib\request.py", line 377, in _parse
          raise ValueError("unknown url type: %r" % self.full_url)
      ValueError: unknown url type: ''
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building editable for triton
Failed to build triton
ERROR: Could not build wheels for triton, which is required to install pyproject.toml-based projects

Refer link: https://github.com/openai/triton#install-from-source

AndyX-Net avatar Aug 05 '23 17:08 AndyX-Net

Same I got the same error (blip_env) C:\Users\james>pip install https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl ERROR: triton-2.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

(blip_env) C:\Users\james>python -V Python 3.11.4

So I guess no triton for those using Python 3.11

jameswan avatar Aug 13 '23 01:08 jameswan

ERROR: triton-2.0.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.

Same issue on Windows 10 for Python 3.11.4

zarnoevic avatar Aug 16 '23 10:08 zarnoevic

Try Python 3.10.11, worked like charm for me

MemoWb avatar Oct 10 '23 06:10 MemoWb

Wasn't able to install it on python:3.11-alpine, but python:3.11-slim works perfectly fine. Seems like they forgot to compile some versions.

Auxority avatar Nov 10 '23 12:11 Auxority