Why does installing numpy require python-dev in Kubuntu 12.04(为什么在 Kubuntu 12.04 中安装 numpy 需要 python-dev)
问题描述
刚开始在 pendrive 12.04 Kubuntu 环境中使用 python.我必须安装 GCC(明白这一点),但我还必须安装 python-dev 才能使用 PIP 安装 numpy.为什么我需要 python-dev?
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
推荐答案
当你使用 pip
安装 numpy 时,包是从源代码编译的.pythonx.x-dev
包包含链接 python 所需的头文件.
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么在 Kubuntu 12.04 中安装 numpy 需要 python-dev


基础教程推荐
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
- Kivy 使用 opencv.调整图像大小 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
- 在 Python 中将货币解析为数字 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- matplotlib 设置 yaxis 标签大小 2022-01-01
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01