Python虚拟环境中的GCC错误

2024-06-09 19:23:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个docker文件,我在其中用python2.7.15创建一个虚拟环境,并为我的项目安装所有必需的python依赖项。在

有些依赖项需要gcc像pandas,lz4一样编译。。由于以下错误而失败

 pandas/io/sas/sas.c:4:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

即使我厌倦了安装python-devel,gcc也在docker中。但没用。在

RUN yum install -y python-pip python-devel gcc

Dockerfile:

^{pr2}$

我怎样才能解决这个问题。在


Tags: 文件项目dockernoiopandas错误虚拟环境