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

[Question] No module named 'tvm' #330

Closed
realcarlos opened this issue Jun 6, 2023 · 8 comments
Closed

[Question] No module named 'tvm' #330

realcarlos opened this issue Jun 6, 2023 · 8 comments
Labels
question Question about the usage

Comments

@realcarlos
Copy link

realcarlos commented Jun 6, 2023

❓ General Questions

python3 build.py --hf-path=ethzanalytics/RedPajama-INCITE-Chat-3B-v1-GPTQ-4bit-128g
Traceback (most recent call last):
File "/Users/xxx/mlc-llm/build.py", line 8, in
import tvm
ModuleNotFoundError: No module named 'tvm'

and I have already installed tvm by:

python3 -m pip install tvm

@realcarlos realcarlos added the question Question about the usage label Jun 6, 2023
@sudeepag
Copy link
Collaborator

sudeepag commented Jun 9, 2023

Could you remove tvm and try to install it using pip install -I mlc_ai_nightly -f https://mlc.ai/wheels?

@junrushao
Copy link
Member

Please refer to this doc for TVM installation: https://mlc.ai/mlc-llm/docs/install/tvm.html

@IgnacioTechie
Copy link

Same error here.

Per the instructions I run to confirm tvm install:

python -c "import tvm; print(tvm.file)"
/home/nacho/.local/lib/python3.11/site-packages/tvm/init.py

python -c "import tvm; print(tvm._ffi.base._LIB)"
<CDLL '/home/nacho/.local/lib/python3.11/site-packages/tvm/libtvm.so', handle 5574d7b12920 at 0x7f5101cd6150>

Then:

mlc_llm_build --help

Traceback (most recent call last):
File "/home/nacho/.local/bin/mlc_llm_build", line 5, in
from mlc_llm.build import main
File "/home/nacho/.local/pipx/venvs/mlc-llm/lib/python3.11/site-packages/mlc_llm/init.py", line 1, in
from . import dispatch
File "/home/nacho/.local/pipx/venvs/mlc-llm/lib/python3.11/site-packages/mlc_llm/dispatch/init.py", line 1, in
from .dispatch_tir_operator import DispatchTIROperator
File "/home/nacho/.local/pipx/venvs/mlc-llm/lib/python3.11/site-packages/mlc_llm/dispatch/dispatch_tir_operator.py", line 2, in
import tvm
ModuleNotFoundError: No module named 'tvm'

@Matthieu-Tinycoaching
Copy link

Hello,

Same error here: mlc-ai/notebooks#24

@IgnacioTechie
Copy link

This worked for me:
pip install --pre mlc-ai-nightly -f https://mlc.ai/wheels

@EntropyGenerator
Copy link

Same issue when building mlc-ai from source. Solved by building tvm. (I have vulkan problem when using prebuild package.)

@ykz9527
Copy link

ykz9527 commented Mar 29, 2024

you can exec:
export PYTHONPATH=$PYTHONPATH:/your-path/mlc-llm/3rdparty/tvm/python/

@shanofrahman
Copy link

For me this works on Google Colab

!python3 -m pip install --pre -U mlc-ai-nightly -f https://mlc.ai/wheels

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

No branches or pull requests

8 participants