The first chapter: System basic Information module:
Download the Psutil module during the installation process error:
wget https://pypi.python.org/packages/source/p/psutil/psutil-2.0.0.tar.gz
So how are we going to find the bags we need? Of course it's official.
https://pypi.python.org/Search the package name directly here
[Email protected] psutil-2.0.0]# python setup.py install
Running Install
Running Build
Running Build_py
Running Build_ext
Building ' _psutil_linux ' extension
Gcc-pthread-fno-strict-aliasing-o2-g-pipe-wall-wp,-d_fortify_source=2-fexceptions-fstack-protector-strong-- Param=ssp-buffer-size=4-grecord-gcc-switches-m64-mtune=generic-d_gnu_source-fpic-fwrapv-dndebug-o2-g-pipe-wall -wp,-d_fortify_source=2-fexceptions-fstack-protector-strong--param=ssp-buffer-size=4-grecord-gcc-switches-m64- Mtune=generic-d_gnu_source-fpic-fwrapv-fpic-i/usr/include/python2.7-c Psutil/_psutil_linux.c-o build/ Temp.linux-x86_64-2.7/psutil/_psutil_linux.o
PSUTIL/_PSUTIL_LINUX.C:12:20: fatal error:python.h:no such file or directory
#include <Python.h>
^
Compilation terminated.
Error:command ' gcc ' failed with exit status 1
Workaround: Install Python to develop a static library:
Yum Install Python-devel
This article is from the "Victor's Struggle" blog, please be sure to keep this source http://victor2016.blog.51cto.com/6768693/1879777
Python automated Transport Koriyuki reading notes (i)