【发布时间】:2021-02-14 02:10:41
【问题描述】:
您好,我正在尝试在 google colab 中运行 git repo, 我按照 git 指令安装了所有要求
在运行某个文件时出现此错误
致命错误:numpy/arrayobject.h:没有这样的文件或目录
#include "numpy/arrayobject.h"
我已经检查了这个错误的解决方案 但他们建议更改 setup.py 中的代码,但我在 google colab 中运行该文件,所以有人帮助我
我在 google colab 中运行的命令是
!python build.py build_ext --inplace
我得到以下错误可以帮助我,我验证了 numpy 已经安装
running build_ext
skipping '_nms_gpu_post.c' Cython extension (up-to-date)
building '_nms_gpu_post' extension
creating build/temp.linux-x86_64-3.6
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c _nms_gpu_post.c -o build/temp.linux-x86_64-3.6/_nms_gpu_post.o
_nms_gpu_post.c:485:10: fatal error: numpy/arrayobject.h: No such file or directory
#include "numpy/arrayobject.h"
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
【问题讨论】:
标签: python python-3.x numpy jupyter-notebook google-colaboratory