Closed k4nar closed 4 years ago
You need to install Python development headers to be able to compile a Python extension.
@jd : The headers are installed, I'm able to compile other Python extensions.
$ ls /usr/include/python3.8/
cpython code.h frameobject.h modsupport.h pyconfig.h pystate.h sysmodule.h
internal compile.h funcobject.h moduleobject.h pyctype.h pystrcmp.h token.h
abstract.h complexobject.h genobject.h namespaceobject.h py_curses.h pystrhex.h traceback.h
asdl.h context.h graminit.h node.h pydebug.h pystrtod.h tracemalloc.h
ast.h datetime.h grammar.h object.h pydtrace.h Python-ast.h tupleobject.h
bitset.h descrobject.h import.h objimpl.h pyerrors.h Python.h typeslots.h
bltinmodule.h dictobject.h interpreteridobject.h odictobject.h pyexpat.h pythonrun.h ucnhash.h
boolobject.h dtoa.h intrcheck.h opcode.h pyfpe.h pythread.h unicodeobject.h
bytearrayobject.h dynamic_annotations.h iterobject.h osdefs.h pyhash.h pytime.h warnings.h
bytes_methods.h enumobject.h listobject.h osmodule.h pylifecycle.h rangeobject.h weakrefobject.h
bytesobject.h errcode.h longintrepr.h parsetok.h pymacconfig.h setobject.h
cellobject.h eval.h longobject.h patchlevel.h pymacro.h sliceobject.h
ceval.h fileobject.h marshal.h picklebufobject.h pymath.h structmember.h
classobject.h fileutils.h memoryobject.h pyarena.h pymem.h structseq.h
codecs.h floatobject.h methodobject.h pycapsule.h pyport.h symtable.h
$ ls /usr/include/python3.8/internal
pycore_accu.h pycore_condvar.h pycore_gil.h pycore_pathconfig.h pycore_pymem.h pycore_warnings.h
pycore_atomic.h pycore_context.h pycore_hamt.h pycore_pyerrors.h pycore_pystate.h
pycore_ceval.h pycore_fileutils.h pycore_initconfig.h pycore_pyhash.h pycore_traceback.h
pycore_code.h pycore_getopt.h pycore_object.h pycore_pylifecycle.h pycore_tupleobject.h
I think the issue is that Cython is generating a file including internal/pystate.h
instead of internal/pycore_pystate.h
. I assume this is what you intended to fix here, but for some reason it doesn't seem to work.
Do you have a way to reproduce that with your Dockerfile
that you could share?
I was able to reproduce it with the official Python 3.8 image: docker run --rm -it python:3.8 pip install --no-binary=:all: ddtrace==0.38.0
Some .c
generated by Python 3.7 have been included in the sdist tarball and Cython does not rebuild and overwrite them.
Thanks!
I am still getting this error Dokerfile
FROM python:3.7.1-alpine3.8
RUN apk add --no-cache python3-dev build-base linux-headers pcre-dev gcc git openssh-client libxml2-dev libxslt-dev
RUN pip install ddtrace==0.38.1
Error:
ddtrace/profiling/collector/stack.c:622:30: fatal error: internal/pystate.h: No such file or directory
#include <internal/pystate.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Hi,
I cannot install ddtrace 0.38.0 without using the provided wheel. It was working with ddtrace version 0.37.1.
Which version of dd-trace-py are you using?
0.38.0 with Python 3.8.3 on Linux (tried from my Archlinux and from a Docker container with Debian)
How can we reproduce your problem?
Run
pip install --no-binary=:all: ddtrace
What is the result that you get?
What is the result that you expected?
I should be able to install ddtrace without using the provided wheels, as I could with previous versions.