尝试安装Numpy: SystemError:无法编译“Python.h”

时间:2021-08-27 23:50:51

I am currently using Cisco that runs on a yocto distr version of Linux. It has already installed Python 2.7.3, and we want to install numpy for this python. However, when I try to do python setup.py install, it gives me:

我现在使用的是在yocto distr版本的Linux上运行的Cisco。它已经安装了Python 2.7.3,我们希望为这条Python安装numpy。但是,当我尝试做python设置时。py安装,它给我:

SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.

Appearently, it is a problem because of the fact that I didn't install python-devel. Because the Cisco machine hasn't configured to internet connection (it is difficult to configure), and I am unable to just do sudo apt-get install python-dev to just crab the file for me.

很明显,这是一个问题,因为我没有安装python-devel。因为Cisco机器还没有配置到internet连接(很难配置),而且我不能只做sudo apt-get安装pythondev,只需要为我准备文件。

What can I do to solve this error (without internet connection)?

我能做什么来解决这个错误(没有网络连接)?

1 个解决方案

#1


1  

Download the python-dev deb file to an external drive from somewhere with an internet connection, mount the drive on the Cisco and install the .deb with

将python-dev deb文件下载到外部驱动器,从某个具有internet连接的地方下载,在Cisco上安装驱动器,并安装.deb。

# dpkg -i debfile.deb

Edit: If you also need to install dependencies, try this: http://www.tuxradar.com/answers/517

编辑:如果您还需要安装依赖项,请尝试:http://www.tuxradar.com/answers/517。

#1


1  

Download the python-dev deb file to an external drive from somewhere with an internet connection, mount the drive on the Cisco and install the .deb with

将python-dev deb文件下载到外部驱动器,从某个具有internet连接的地方下载,在Cisco上安装驱动器,并安装.deb。

# dpkg -i debfile.deb

Edit: If you also need to install dependencies, try this: http://www.tuxradar.com/answers/517

编辑:如果您还需要安装依赖项,请尝试:http://www.tuxradar.com/answers/517。