Unable to install meinheld

358 views
Skip to first unread message

Ankit Kumar

unread,
Mar 31, 2021, 7:35:26 AM3/31/21
to meinheld
Hi, 
I am unable to install meinheld in my application and getting the following error:

Collecting meinheld
  Using cached meinheld-1.0.2.tar.gz (83 kB)
Requirement already satisfied, skipping upgrade: greenlet<0.5,>=0.4.5 in /home/ec2-user/local/venvs/tellybugvenv/lib/python3.8/site-packages (from meinheld) (0.4.17)
Building wheels for collected packages: meinheld
  Building wheel for meinheld (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/ec2-user/local/venvs/tellybugvenv/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5v35i1ok/meinheld/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5v35i1ok/meinheld/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dcwtt7h0
       cwd: /tmp/pip-install-5v35i1ok/meinheld/
  Complete output (27 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/meinheld
  copying meinheld/__init__.py -> build/lib.linux-x86_64-3.8/meinheld
  copying meinheld/common.py -> build/lib.linux-x86_64-3.8/meinheld
  copying meinheld/gmeinheld.py -> build/lib.linux-x86_64-3.8/meinheld
  copying meinheld/middleware.py -> build/lib.linux-x86_64-3.8/meinheld
  copying meinheld/mlogging.py -> build/lib.linux-x86_64-3.8/meinheld
  copying meinheld/msocket.py -> build/lib.linux-x86_64-3.8/meinheld
  copying meinheld/patch.py -> build/lib.linux-x86_64-3.8/meinheld
  copying meinheld/websocket.py -> build/lib.linux-x86_64-3.8/meinheld
  running build_ext
  building 'meinheld.server' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/meinheld
  creating build/temp.linux-x86_64-3.8/meinheld/server
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DWITH_GREENLET -DHTTP_PARSER_DEBUG=0 -I/home/ec2-user/local/venvs/tellybugvenv/include -I/usr/include/python3.8 -c meinheld/server/buffer.c -o build/temp.linux-x86_64-3.8/meinheld/server/buffer.o
  In file included from meinheld/server/buffer.h:4:0,
                   from meinheld/server/buffer.c:1:
  meinheld/server/meinheld.h:4:10: fatal error: Python.h: No such file or directory
   #include <Python.h>
            ^~~~~~~~~~
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for meinheld
  Running setup.py clean for meinheld
Failed to build meinheld
Installing collected packages: meinheld
    Running setup.py install for meinheld ... error
    ERROR: Command errored out with exit status 1:
     command: /home/ec2-user/local/venvs/tellybugvenv/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5v35i1ok/meinheld/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5v35i1ok/meinheld/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-sehabw8v/install-record.txt --single-version-externally-managed --compile --install-headers /home/ec2-user/local/venvs/tellybugvenv/include/site/python3.8/meinheld
         cwd: /tmp/pip-install-5v35i1ok/meinheld/
    Complete output (27 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/meinheld
    copying meinheld/__init__.py -> build/lib.linux-x86_64-3.8/meinheld
    copying meinheld/common.py -> build/lib.linux-x86_64-3.8/meinheld
    copying meinheld/gmeinheld.py -> build/lib.linux-x86_64-3.8/meinheld
    copying meinheld/middleware.py -> build/lib.linux-x86_64-3.8/meinheld
    copying meinheld/mlogging.py -> build/lib.linux-x86_64-3.8/meinheld
    copying meinheld/msocket.py -> build/lib.linux-x86_64-3.8/meinheld
    copying meinheld/patch.py -> build/lib.linux-x86_64-3.8/meinheld
    copying meinheld/websocket.py -> build/lib.linux-x86_64-3.8/meinheld
    running build_ext
    building 'meinheld.server' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/meinheld
    creating build/temp.linux-x86_64-3.8/meinheld/server
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DWITH_GREENLET -DHTTP_PARSER_DEBUG=0 -I/home/ec2-user/local/venvs/tellybugvenv/include -I/usr/include/python3.8 -c meinheld/server/buffer.c -o build/temp.linux-x86_64-3.8/meinheld/server/buffer.o
    In file included from meinheld/server/buffer.h:4:0,
                     from meinheld/server/buffer.c:1:
    meinheld/server/meinheld.h:4:10: fatal error: Python.h: No such file or directory
     #include <Python.h>
              ^~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/ec2-user/local/venvs/tellybugvenv/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5v35i1ok/meinheld/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5v35i1ok/meinheld/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-sehabw8v/install-record.txt --single-version-externally-managed --compile --install-headers /home/ec2-user/local/venvs/tellybugvenv/include/site/python3.8/meinheld Check the logs for full command output.



Can someone please help me resolve this issue?

Best regards,
Ankit Kumar
Reply all
Reply to author
Forward
0 new messages