sglang icon indicating copy to clipboard operation
sglang copied to clipboard

Error: Python.h

Open dipta007 opened this issue 10 months ago • 2 comments

I am getting this error

/tmp/tmpfk2hveif/main.c:4:10: fatal error: Python.h: No such file or directory
    4 | #include <Python.h>
      |          ^~~~~~~~~~

I have used the following command from terminal:

python -m sglang.launch_server     --model-path meta-llama/Meta-Llama-3.1-8B-Instruct     --host 0.0.0.0

OS: Ubuntu 22.04.5 LTS CUDA: 12.2 GPU: 2xA100

dipta007 avatar Feb 17 '25 04:02 dipta007

Can you try to use docker?

shuaills avatar Feb 17 '25 08:02 shuaills

Can you try to use docker?

@shuaills the school server doesn't have docker. so no ☹ But I tried the same thing with conda env and pip install, it worked fine.

I am guessing there is some issue with the python itself in uv env. Just can't figure it out.

dipta007 avatar Feb 17 '25 17:02 dipta007