Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 致命错误:numpy/arrayobject.h:没有这样的文件或目录“include”;numpy/arrayobject.h“;在google colab中_Python_Python 3.x_Numpy_Jupyter Notebook_Google Colaboratory - Fatal编程技术网

Python 致命错误:numpy/arrayobject.h:没有这样的文件或目录“include”;numpy/arrayobject.h“;在google colab中

Python 致命错误:numpy/arrayobject.h:没有这样的文件或目录“include”;numpy/arrayobject.h“;在google colab中,python,python-3.x,numpy,jupyter-notebook,google-colaboratory,Python,Python 3.x,Numpy,Jupyter Notebook,Google Colaboratory,您好,我正试图在google colab中运行git回购, 我按照git说明安装了所有要求 在运行特定文件时,我遇到了此错误 致命错误:numpy/arrayobject.h:没有这样的文件或目录 #包括“numpy/arrayobject.h” 我已经检查了此错误的解决方案 但他们建议更改setup.py中的代码,但我正在google colab中运行该文件,所以有人会帮助我 我在google colab中运行的命令是 !python build.py build_ext --inp

您好,我正试图在google colab中运行git回购, 我按照git说明安装了所有要求

在运行特定文件时,我遇到了此错误

致命错误:numpy/arrayobject.h:没有这样的文件或目录
#包括“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

我遇到了一个类似的问题,我通过编辑
build.py
解决了这个问题:

ext_modules=[
        Extension("my_module", ["my_module.c"],
                  include_dirs=[numpy.get_include()]),
    ]

这里
include\u dirs=[numpy.get\u include()]
是解决这个问题所需要的部分。

这是否回答了您的问题?