rkern / line_profiler

(OLD REPO) Line-by-line profiling for Python - Current repo ->
https://github.com/pyutils/line_profiler
Other
3.6k stars 254 forks source link

Installation via pip failed in pypy virtualenv #92

Closed hoangvanthien closed 7 years ago

hoangvanthien commented 7 years ago

Here is the error:

gcc -pthread -arch x86_64 -DNDEBUG -O2 -fPIC -I/Users/thienhoang/CodeGarden/pyenv/include -c _line_profiler.c -o build/temp.macosx-10.12-x86_64-2.7/_line_profiler.o
_line_profiler.c:4:10: fatal error: 'Python.h' file not found
  #include "Python.h"
           ^
  1 error generated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for line-profiler
 gcc -pthread -arch x86_64 -DNDEBUG -O2 -fPIC -I/Users/thienhoang/CodeGarden/pyenv/include -c _scandir.c -o build/temp.macosx-10.12-x86_64-2.7/_scandir.o
  _scandir.c:14:10: fatal error: 'Python.h' file not found
  #include <Python.h>
           ^
  1 error generated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for scandir

Installation works in normal Python 2 virtualenv as well as Python 2 (without virtualenv), but fails in PyPy virtualenv.

rkern commented 7 years ago

PyPy does not support the tracing hooks that line_profiler uses, so PyPy is not supported.