erreur fatale lors de l'installation de pip3 psutil: Python.h: aucun fichier ou répertoire de ce type
Erreur lors de l'installation de pip3 psutil
$ pip3 install psutil
Collecting psutil
Downloading psutil-5.7.0.tar.gz (449 kB)
|????????????????????????????????| 449 kB 3.6 MB/s
Building wheels for collected packages: psutil
Building wheel for psutil (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ep62l8yz/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ep62l8yz/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ctube83k
cwd: /tmp/pip-install-ep62l8yz/psutil/
Complete output (42 lines):
...
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/psutil
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=570 -DPSUTIL_LINUX=1 -I/usr/include/python3.5m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.5/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h:Il n'y a pas de tel fichier ou répertoire
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psutil
Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil
Running setup.py install for psutil ... error
ERROR: Command errored out with exit status 1:
...
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/psutil
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=570 -DPSUTIL_LINUX=1 -I/usr/include/python3.5m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.5/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h:Il n'y a pas de tel fichier ou répertoire
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ep62l8yz/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ep62l8yz/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vtubkrgc/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5/psutil Check the logs for full command output.
Résolu ci-dessous
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y python3-dev
sudo pip3 install psutil
giampaolo psutil Why can't I install python3.6-dev on Ubuntu16.04 Que faire si l'installation de python3.6-dev échoue sur Ubuntu 16.04
Recommended Posts