自学内容网 自学内容网

解决 Fail to pip install mlc-llm

[Question] Fail to pip install mlc-llm · Issue #2974 · mlc-ai/mlc-llm · GitHub

❓ General Questions

Hi, I’m trying to install mlc-llm on my Jetson agx orin.
Environment: Jetson agx orin、Ubuntu 20.04、CUDA 12.2
I ran the following commands:
conda create -n mlc python=3.11
conda activate mlc
conda install -c conda-forge git-lfs
conda install -c conda-forge libgcc-ng
and then
python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cu122 mlc-ai-nightly-cu122
It seems that I have successfully installed them.
Installing collected packages: mlc-llm-nightly-cu122, mlc-ai-nightly-cu122 Successfully installed mlc-ai-nightly-cu122-0.1 mlc-llm-nightly-cu122-0.1
But I failed to import mlc_llm
python -c "import mlc_llm; print(mlc_llm)"
Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'mlc_llm'

pip list 已安装mlc-llm 

更换安装方式

安装环境

  • CMake >= 3.24

  • Git

  • Rust and Cargo, required by Hugging Face’s tokenizer

  • One of the GPU runtimes:

    • CUDA >= 11.8 (NVIDIA GPUs)

    • Metal (Apple GPUs)

    • Vulkan (NVIDIA, AMD, Intel GPUs)

安装

# clone from GitHub
git clone --recursive https://github.com/mlc-ai/mlc-llm.git && cd mlc-llm/
# create build directory
mkdir -p build && cd build
# generate build configuration
python ../cmake/gen_cmake_config.py
# build mlc_llm libraries
cmake .. && cmake --build . --parallel $(nproc) && cd ..

全局路径

export MLC_LLM_SOURCE_DIR=/path-to-mlc-llm
export PYTHONPATH=$MLC_LLM_SOURCE_DIR/python:$PYTHONPATH
alias mlc_llm="python -m mlc_llm"

原文地址:https://blog.csdn.net/Aorg1/article/details/143562253

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!