Failed building wheel for http-parser | http_parser/parser.c:4:10: fatal error: Python.h: No such file or directory

Aberta
#93 1 comentário 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
30/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
c, python
Domínio
build-system

Direção de pesquisa

Reproduza o comando relatado pip install git+https://github.com/benoitc/http-parser no ambiente Python 2.7 mostrado. Comece com http_parser/parser.c e o comando de build da extensão registrado; em seguida, rastreie a configuração de build do pacote; o trabalho estará concluído quando o wheel for compilado sem a falha de compilação de Python.h relatada.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Full log :

pip install git+https://github.com/benoitc/http-parser 
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/benoitc/http-parser
  Cloning https://github.com/benoitc/http-parser to /tmp/pip-req-build-ilQJuJ
  Running command git clone -q https://github.com/benoitc/http-parser /tmp/pip-req-build-ilQJuJ
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: http-parser
  Building wheel for http-parser (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python2 /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmplnGbGj
       cwd: /tmp/pip-req-build-ilQJuJ
  Complete output (24 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/http_parser
  copying http_parser/_socketio.py -> build/lib.linux-x86_64-2.7/http_parser
  copying http_parser/pyparser.py -> build/lib.linux-x86_64-2.7/http_parser
  copying http_parser/util.py -> build/lib.linux-x86_64-2.7/http_parser
  copying http_parser/__init__.py -> build/lib.linux-x86_64-2.7/http_parser
  copying http_parser/http.py -> build/lib.linux-x86_64-2.7/http_parser
  copying http_parser/reader.py -> build/lib.linux-x86_64-2.7/http_parser
  running build_ext
  make: Nothing to be done for 'all'.
  building 'http_parser.parser' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/http_parser
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Iparser -I/usr/include/python2.7 -c http_parser/http_parser.c -o build/temp.linux-x86_64-2.7/http_parser/http_parser.o
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Iparser -I/usr/include/python2.7 -c http_parser/parser.c -o build/temp.linux-x86_64-2.7/http_parser/parser.o
  http_parser/parser.c:4:10: fatal error: Python.h: No such file or directory
      4 | #include "Python.h"
        |          ^~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for http-parser
Failed to build http-parser
ERROR: Could not build wheels for http-parser which use PEP 517 and cannot be installed directly

Linguagem predominante
C
Estrelas
345
Forks
93
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de benoitc/http-parser

Todas as issues de benoitc/http-parser

Issues semelhantes

Mais issues de C

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.