Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'triton._C.libtriton.triton'; 'triton._C.libtriton' is not a package #4272

Closed
amark071 opened this issue Jul 8, 2024 · 4 comments

Comments

@amark071
Copy link

amark071 commented Jul 8, 2024

I have met such problem when I tried to import the package,when I tried to find where the file"_C" is,I found it empty!How could I solve it?Is there anything wrong when I install triton?

Traceback (most recent call last):
File "/home/master/triton/test/my/matmul_new.py", line 4, in
import triton._C.libtriton.triton as _triton
ModuleNotFoundError: No module named 'triton._C.libtriton.triton'; 'triton._C.libtriton' is not a package

@dengl11
Copy link
Contributor

dengl11 commented Jul 10, 2024

I think the underlying C++ dependency (used for pybind) needs to be installed first if you are importing the triton library from source (instead of from pip install triton)

so inside the top level directory of the triton repo,

$ MAX_JOBS=16 pip install -e python

(and wait for a few minutes)

then you can see

❯ tree python/triton/_C
python/triton/_C
├── include -> ../../../include/
├── libGPUHello.so
├── libproton.so
└── libtriton.so

and the error should go away

@amark071
Copy link
Author

Solve it! Thankssss

@dengl11
Copy link
Contributor

dengl11 commented Jul 18, 2024

(Great! shall we close it now?)

@Edenzzzz
Copy link

Edenzzzz commented Dec 7, 2024

I have all these after install from source, but still not working. I followed the guide to install pip install ninja cmake wheel pybind11 first. Any help would be appreciated.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants