- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试在我的树莓派上安装 psutil,但我似乎无法开始工作。如果我执行 pip install 我会收到此错误:
psutil/_psutil_linux.c:10:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import
setuptools;__file__='/home/pi/build/psutil/setup.py';exec(compile(open(__file__).read().replace('\r\n ', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-V39ila-record/install-record.txt failed with error code 1 in /home/pi/build/psutil
Storing complete log in /root/.pip/pip.log
如果我尝试从安装文件的目录中构建 python setup.py,我会收到此错误:
psutil/_psutil_linux.c:10:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
如果有人可以帮助我安装这个,那就太好了。
最佳答案
您还需要安装 Python 开发头文件。在 Debian(Raspbian“wheezy”)上,安装 python-dev
包:
sudo apt-get install python-dev
或运行:
sudo apt-get build-dep python
并获得一些在编译 Python C 扩展时派上用场的包。在较新的 Debian 版本中将 python
替换为 python3
。
在 Fedora (Pidora) 上,最后一个命令的等价物是:
sudo yum install yum-utils
sudo yum-builddep python
如果您的系统较新,您也可能需要将 python
替换为 python3
。
关于python - 树莓派 - psutil 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18237484/
(“ donut 派”)是否有最大切片数?我使用了 highchart(“ donut 派”)示例,但无法超过 10 个切片。请注意,内部切片“F”丢失了。下面是示例代码。 http://jsfidd
有谁知道如何找到 Samsung Galaxy 手机等同于 Settings.ACTION_ZEN_MODE_PRIORITY_SETTINGS 的常量?我有一个应用程序在三星用户单击应该将他们带到“
所以我很难弄清楚如何设置饼图/图例位置的布局。我希望图例左对齐,饼图右对齐。 40/60 百分比 -ish。 像这样: chart = new Highcharts.Chart({ c
我试图创建一种带有 4 个切片的圆形旋转木马,通过单击一个切片,它会扩展到约 2/3 的饼图,显示它的内容(另一个切片同样会收缩)基本上我是从 raphael “growing pie” 演示开始的
我尝试了所有可能的方式来提供 PIE.js 的路径,我使用的是 asp.net,这与在 java+tomcat 中的工作方式相同。我试过这样给 1)文件:css/home.css,css/pie/PI
cmds = ['time'] while True: inp = input('::> ') sinp = inp.split() if str(sinp[0]) in cm
我已经在 Raphael Google Groups 上看到过这个问题,但经过数小时的搜索后,在这里以及 Google 上,我似乎找不到解决方案。 我只是希望能够使用 jQuery 定位我的饼图(sv
这个问题在这里已经有了答案: Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE (5
我是一名优秀的程序员,十分优秀!