wlav / cppyy

Other
391 stars 40 forks source link

src/CPyCppyy.h:35:10: fatal error: 'Python.h' file not found #136

Closed NiKeYiGuN closed 1 year ago

NiKeYiGuN commented 1 year ago

Building wheels for collected packages: CPyCppyy Building wheel for CPyCppyy (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for CPyCppyy (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [16 lines of output] /tmp/pip-build-env-s87zyjr5/overlay/lib/python3.9/site-packages/setuptools/config/setupcfg.py:520: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead. warnings.warn(msg, warning_class) running bdist_wheel running build running build_ext building 'libcppyy' extension creating build creating build/temp.linux-x86_64-cpython-39 creating build/temp.linux-x86_64-cpython-39/src /usr/bin/clang -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Iinclude -I/home/zhenhao/文档/GIT/mymeep/venv/include -I/usr/include/python3.9 src/API.cxx -o build/temp.linux-x86_64-cpython-39/src/API.o -O2 -pthread -std=c++1z -m64 -Wno-bad-function-cast -Wno-register -Wno-strict-aliasing In file included from src/API.cxx:2: src/CPyCppyy.h:35:10: fatal error: 'Python.h' file not found

include "Python.h"

           ^~~~~~~~~~
  1 error generated.
  error: command '/usr/bin/clang' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for CPyCppyy Failed to build CPyCppyy ERROR: Could not build wheels for CPyCppyy, which is required to install pyproject.toml-based projects

NiKeYiGuN commented 1 year ago

ubuntu18.04 python3.9

wlav commented 1 year ago

apt install python3-dev

NiKeYiGuN commented 1 year ago

3q apt install python3.9-dev working.

wlav commented 1 year ago

Closing, since reported fixed.