[GH-ISSUE #13] ModuleNotFoundError: No module named 'mooncake_vllm_adaptor' #11

Closed
opened 2026-10-29 21:07:51 +00:00 by bsakaguchi · 8 comments
Owner

Originally created by @tongyangyeyue on GitHub (Dec 3, 2024).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/13

I followed the vllm-integration.md document and selected vLLM Python-only build (python3 python_only_dev.py) to install,then i got this errors after "python3 -m vllm.entrypoints.openai.api_server"

Traceback (most recent call last):
  File "/root/anaconda3/envs/mooncake/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/root/anaconda3/envs/mooncake/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/home/ubuntu/vllm/vllm/__init__.py", line 3, in <module>
    from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs
  File "/home/ubuntu/vllm/vllm/engine/arg_utils.py", line 11, in <module>
    from vllm.config import (CacheConfig, ConfigFormat, DecodingConfig,
  File "/home/ubuntu/vllm/vllm/config.py", line 12, in <module>
    from vllm.model_executor.layers.quantization import QUANTIZATION_METHODS
  File "/home/ubuntu/vllm/vllm/model_executor/__init__.py", line 1, in <module>
    from vllm.model_executor.parameter import (BasevLLMParameter,
  File "/home/ubuntu/vllm/vllm/model_executor/parameter.py", line 7, in <module>
    from vllm.distributed import get_tensor_model_parallel_rank
  File "/home/ubuntu/vllm/vllm/distributed/__init__.py", line 1, in <module>
    from .communication_op import *
  File "/home/ubuntu/vllm/vllm/distributed/communication_op.py", line 6, in <module>
    from .parallel_state import get_tp_group
  File "/home/ubuntu/vllm/vllm/distributed/parallel_state.py", line 40, in <module>
    import vllm.distributed.kv_transfer.vllm_adapter as dist_kv
  File "/home/ubuntu/vllm/vllm/distributed/kv_transfer/vllm_adapter.py", line 38, in <module>
    from vllm.distributed.kv_transfer.kv_pipe.mooncake_distributed_pipe import (
  File "/home/ubuntu/vllm/vllm/distributed/kv_transfer/kv_pipe/mooncake_distributed_pipe.py", line 8, in <module>
    import mooncake_vllm_adaptor as mva
ModuleNotFoundError: No module named 'mooncake_vllm_adaptor'

I can't find "mooncake_vllm_adaptor" anywhere, how can I install this dependency?

Originally created by @tongyangyeyue on GitHub (Dec 3, 2024). Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/13 I followed the vllm-integration.md document and selected vLLM Python-only build (python3 python_only_dev.py) to install,then i got this errors after "python3 -m vllm.entrypoints.openai.api_server" ``` Traceback (most recent call last): File "/root/anaconda3/envs/mooncake/lib/python3.10/runpy.py", line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/root/anaconda3/envs/mooncake/lib/python3.10/runpy.py", line 110, in _get_module_details __import__(pkg_name) File "/home/ubuntu/vllm/vllm/__init__.py", line 3, in <module> from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs File "/home/ubuntu/vllm/vllm/engine/arg_utils.py", line 11, in <module> from vllm.config import (CacheConfig, ConfigFormat, DecodingConfig, File "/home/ubuntu/vllm/vllm/config.py", line 12, in <module> from vllm.model_executor.layers.quantization import QUANTIZATION_METHODS File "/home/ubuntu/vllm/vllm/model_executor/__init__.py", line 1, in <module> from vllm.model_executor.parameter import (BasevLLMParameter, File "/home/ubuntu/vllm/vllm/model_executor/parameter.py", line 7, in <module> from vllm.distributed import get_tensor_model_parallel_rank File "/home/ubuntu/vllm/vllm/distributed/__init__.py", line 1, in <module> from .communication_op import * File "/home/ubuntu/vllm/vllm/distributed/communication_op.py", line 6, in <module> from .parallel_state import get_tp_group File "/home/ubuntu/vllm/vllm/distributed/parallel_state.py", line 40, in <module> import vllm.distributed.kv_transfer.vllm_adapter as dist_kv File "/home/ubuntu/vllm/vllm/distributed/kv_transfer/vllm_adapter.py", line 38, in <module> from vllm.distributed.kv_transfer.kv_pipe.mooncake_distributed_pipe import ( File "/home/ubuntu/vllm/vllm/distributed/kv_transfer/kv_pipe/mooncake_distributed_pipe.py", line 8, in <module> import mooncake_vllm_adaptor as mva ModuleNotFoundError: No module named 'mooncake_vllm_adaptor' ``` I can't find "mooncake_vllm_adaptor" anywhere, how can I install this dependency?
Author
Owner

@ShangmingCai commented on GitHub (Dec 3, 2024):

Please install the Mooncake Transfer Engine according to the instructions first.

Then check whether the mooncake_vllm_adaptor.xxxx.so is in your python dist-packages or site-packages dir.

<!-- gh-comment-id:2514401499 --> @ShangmingCai commented on GitHub (Dec 3, 2024): Please install the Mooncake Transfer Engine according to the [instructions](https://github.com/kvcache-ai/Mooncake/blob/main/doc/en/build.md) first. Then check whether the `mooncake_vllm_adaptor.xxxx.so` is in your python `dist-packages` or `site-packages` dir.
Author
Owner

@tongyangyeyue commented on GitHub (Dec 4, 2024):

i find them ,thx

<!-- gh-comment-id:2516036309 --> @tongyangyeyue commented on GitHub (Dec 4, 2024): i find them ,thx
Author
Owner

@CharlesJhonson commented on GitHub (Jan 14, 2025):

Hi, how can I fix this ? Could you help @ShangmingCai
ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE

....
INFO 01-14 19:38:12 selector.py:129] Using XFormers backend.
ERROR 01-14 19:38:13 engine.py:366] Please install mooncake by following the instructions at https://github.com/kvcache-ai/Mooncake/blob/main/doc/en/build.md to run vLLM with MooncakeConnector.
ERROR 01-14 19:38:13 engine.py:366] Traceback (most recent call last):
ERROR 01-14 19:38:13 engine.py:366]   File "/home/miniforge3/envs/kvcache/lib/python3.10/site-packages/vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py", line 57, in __init__
ERROR 01-14 19:38:13 engine.py:366]     import mooncake_vllm_adaptor as mva
ERROR 01-14 19:38:13 engine.py:366] ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE
ERROR 01-14 19:38:13 engine.py:366] 
ERROR 01-14 19:38:13 engine.py:366] The above exception was the direct cause of the following exception:
....
<!-- gh-comment-id:2589696371 --> @CharlesJhonson commented on GitHub (Jan 14, 2025): Hi, how can I fix this ? Could you help @ShangmingCai `ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE` ``` .... INFO 01-14 19:38:12 selector.py:129] Using XFormers backend. ERROR 01-14 19:38:13 engine.py:366] Please install mooncake by following the instructions at https://github.com/kvcache-ai/Mooncake/blob/main/doc/en/build.md to run vLLM with MooncakeConnector. ERROR 01-14 19:38:13 engine.py:366] Traceback (most recent call last): ERROR 01-14 19:38:13 engine.py:366] File "/home/miniforge3/envs/kvcache/lib/python3.10/site-packages/vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py", line 57, in __init__ ERROR 01-14 19:38:13 engine.py:366] import mooncake_vllm_adaptor as mva ERROR 01-14 19:38:13 engine.py:366] ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE ERROR 01-14 19:38:13 engine.py:366] ERROR 01-14 19:38:13 engine.py:366] The above exception was the direct cause of the following exception: .... ```
Author
Owner

@ShangmingCai commented on GitHub (Jan 15, 2025):

Hi, how can I fix this ? Could you help @ShangmingCai ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE

I wonder if you have installed mooncake transfer engine and vllm adapter according to the guide. When installing, you need to build and install with your python env activated, so that the .so lib can be installed into the site-packages dir.

If the problem still exists, it may be related to your OS and the c++ lib when compiling.

<!-- gh-comment-id:2591561964 --> @ShangmingCai commented on GitHub (Jan 15, 2025): > Hi, how can I fix this ? Could you help @ShangmingCai `ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE` > I wonder if you have installed mooncake transfer engine and vllm adapter according to the [guide](https://github.com/kvcache-ai/Mooncake/blob/main/doc/en/build.md). When installing, you need to build and install with your python env activated, so that the` .so` lib can be installed into the `site-packages` dir. If the problem still exists, it may be related to your OS and the c++ lib when compiling.
Author
Owner

@tongyangyeyue commented on GitHub (Jan 15, 2025):

Hi, how can I fix this ? Could you help @ShangmingCai ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE

....
INFO 01-14 19:38:12 selector.py:129] Using XFormers backend.
ERROR 01-14 19:38:13 engine.py:366] Please install mooncake by following the instructions at https://github.com/kvcache-ai/Mooncake/blob/main/doc/en/build.md to run vLLM with MooncakeConnector.
ERROR 01-14 19:38:13 engine.py:366] Traceback (most recent call last):
ERROR 01-14 19:38:13 engine.py:366]   File "/home/miniforge3/envs/kvcache/lib/python3.10/site-packages/vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py", line 57, in __init__
ERROR 01-14 19:38:13 engine.py:366]     import mooncake_vllm_adaptor as mva
ERROR 01-14 19:38:13 engine.py:366] ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE
ERROR 01-14 19:38:13 engine.py:366] 
ERROR 01-14 19:38:13 engine.py:366] The above exception was the direct cause of the following exception:
....

after i make mooncake in build directory,i find mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so in build/mooncake-integration,then copy mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so to my python lib /home/ubuntu/anaconda3/envs/mooncake/lib/python3.10/site-packages/

<!-- gh-comment-id:2591572175 --> @tongyangyeyue commented on GitHub (Jan 15, 2025): > Hi, how can I fix this ? Could you help @ShangmingCai `ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE` > > ``` > .... > INFO 01-14 19:38:12 selector.py:129] Using XFormers backend. > ERROR 01-14 19:38:13 engine.py:366] Please install mooncake by following the instructions at https://github.com/kvcache-ai/Mooncake/blob/main/doc/en/build.md to run vLLM with MooncakeConnector. > ERROR 01-14 19:38:13 engine.py:366] Traceback (most recent call last): > ERROR 01-14 19:38:13 engine.py:366] File "/home/miniforge3/envs/kvcache/lib/python3.10/site-packages/vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py", line 57, in __init__ > ERROR 01-14 19:38:13 engine.py:366] import mooncake_vllm_adaptor as mva > ERROR 01-14 19:38:13 engine.py:366] ImportError: /home/miniforge3/envs/kvcache/lib/python3.10/site-packages/mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN6google15ErrnoLogMessageC1EPKciiiMNS_10LogMessageEFvvE > ERROR 01-14 19:38:13 engine.py:366] > ERROR 01-14 19:38:13 engine.py:366] The above exception was the direct cause of the following exception: > .... > ``` after i make mooncake in build directory,i find mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so in build/mooncake-integration,then copy mooncake_vllm_adaptor.cpython-310-x86_64-linux-gnu.so to my python lib /home/ubuntu/anaconda3/envs/mooncake/lib/python3.10/site-packages/
Author
Owner

@CharlesJhonson commented on GitHub (Jan 17, 2025):

Fixed!
activate python env, and build, the copy to python lib dir.
thank you very much. @ShangmingCai @tongyangyeyue

<!-- gh-comment-id:2597243273 --> @CharlesJhonson commented on GitHub (Jan 17, 2025): Fixed! activate python env, and build, the copy to python lib dir. thank you very much. @ShangmingCai @tongyangyeyue
Author
Owner

@pooyadavoodi commented on GitHub (Apr 14, 2025):

I think this happens because make install copies the so file into /usr/local/lib/ instead of the local venv directory.

<!-- gh-comment-id:2800307321 --> @pooyadavoodi commented on GitHub (Apr 14, 2025): I think this happens because `make install` copies the `so` file into `/usr/local/lib/` instead of the local venv directory.
Author
Owner

@pooyadavoodi commented on GitHub (Apr 14, 2025):

Just to help folks who follow the doc: https://github.com/kvcache-ai/Mooncake/pull/241

<!-- gh-comment-id:2800317114 --> @pooyadavoodi commented on GitHub (Apr 14, 2025): Just to help folks who follow the doc: https://github.com/kvcache-ai/Mooncake/pull/241
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/Mooncake#11
No description provided.