mlc-llm icon indicating copy to clipboard operation
mlc-llm copied to clipboard

[Question] No module named 'tvm'

Open realcarlos opened this issue 2 years ago • 1 comments

❓ 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 avatar Jun 06 '23 08:06 realcarlos

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

sudeepag avatar Jun 09 '23 03:06 sudeepag

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

junrushao avatar Jun 12 '23 17:06 junrushao

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'

IgnacioTechie avatar Aug 29 '23 14:08 IgnacioTechie

Hello,

Same error here: https://github.com/mlc-ai/notebooks/issues/24

Matthieu-Tinycoaching avatar Sep 06 '23 13:09 Matthieu-Tinycoaching

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

IgnacioTechie avatar Sep 06 '23 14:09 IgnacioTechie

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

EntropyGenerator avatar Jan 21 '24 11:01 EntropyGenerator

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

ykz9527 avatar Mar 29 '24 14:03 ykz9527