PTT
Submit
Submit
选择语言
正體中文
简体中文
PTT
C_and_CPP
Re: [问题] 'numpy/arrayobject.h' file not found
楼主:
ilms49898723
(LittleBird)
2019-08-13 08:54:07
因为导致那个错误的档案并不是同一个
只看这两行:
#include <Python.h>
#include <numpy/arrayobject.h>
(一)
Python.h在我的Case可以在/usr/include/python3.6/下找到,
因为Compiler通常都会找/usr/include,
所以你改成<Python/Python.h>可以Work
(我的case就要改成<python3.6/Python.h>)
(二)
但这样编译又跳出找不到Python.h,为什么?
因为那个Python.h的问题不在你的code,
在ndarrayobject.h (arrayobject.h有include这个档案),
很明显的直接去改这个档案是个很糟的做法,
所以我们就补上Python.h的位置资讯给他:
(路径请参照自己的改)
Add: /usr/include/python3.6
Add: /path/to/numpy/installation/core/include
(三)
这样就解释为什么你把include/去掉就找的到Python.h,
因为他找不到numpy/arrayobject.h,
自然不会有(二)
Compiler给的Message建议还是看完整不要只看结论XD
作者: Philethan (PE)
2019-08-13 16:32:00
大大您好,想请问该怎么知道Xcode compiler会找哪资料夹。感谢大大 我在想一下..
继续阅读
Re: [问题] 请问初学C++语言推荐书(文长
dzwei
Re: [问题] Cache size量测小程式数据解释
johnjohnlin
[问题] Cache size量测小程式数据解释
hsnuer1171
[问题] dll 资料存取问题与相依性
OfficeGL
[问题] 有什么小型专案适合新手呢
willy3570
[问题] 图形连续更新 UI 不冻结
PythonScript
[问题] 大一程设小问题
y995526
[问题] 学习C++
c2578910
[问题] return by value但用 move有特殊意义吗
lovejomi
Re: [问题] sturct/union extern后又定义 没有问题?
boss0405
Links
booklink
Contact Us: admin [ a t ] ucptt.com