赞
踩
原帖链接:
https://stackoverflow.com/questions/63211981/include-python-h-error-initconfig-h-not-found
You cannot and should not include Python.h this way.
You need to #include <Python.h>
and pass an appropriate -I command line argument to the compiler,
e.g. -I/usr/include/python3.8.
try locate your Python.h:
gemfield@ThinkPad-X1C:~$ locate Python.h
/home/gemfield/anaconda3/include/python3.7m/Python.h
/home/gemfield/anaconda3/pkgs/python-3.7.6-h0371630_2/include/python3.7m/Python.h
/usr/include/python3.8/Python.h
Then
g++ -I/usr/include/python3.8 ...
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。