为什么在Kubuntu 12.04中安装numpy需要python-dev [英] Why does installing numpy require python-dev in Kubuntu 12.04

查看:139
本文介绍了为什么在Kubuntu 12.04中安装numpy需要python-dev的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在pendrive 12.04 Kubuntu环境下刚刚开始在python中。我不得不安装GCC(了解),但是我也必须安装python-dev,然后才能使用PIP来安装numpy。为什么需要python-dev?

  sudo apt-get install gcc 
sudo apt-get install pip
cd /usr/lib/python2.7/
sudo apt-get install python-dev
sudo pip install numpy


解决方案

当您使用 pip 安装numpy时,软件包是从源代码编译的。 pythonx.x-dev 包含必需的头文件,用于链接python。


Just starting out in python on a pendrive 12.04 Kubuntu environment. I had to install GCC (understand that), but I also had to install python-dev before I could use PIP to install numpy. Why do I need python-dev?

sudo apt-get install gcc
sudo apt-get install pip
cd /usr/lib/python2.7/
sudo apt-get install python-dev
sudo pip install numpy

解决方案

When you use pip to install numpy, the packages is compiled from source. The pythonx.x-dev packages contain the necessary header files for linking against python.

这篇关于为什么在Kubuntu 12.04中安装numpy需要python-dev的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆