ModuleNotFoundError: No module named 'psutil' [duplicate] - python

This question already has answers here:
fatal error: Python.h: No such file or directory
(35 answers)
Closed 2 years ago.
Tried to installed module using pip but getting below error? Can any one help.
My machine is OEL7
(my_env) [root#TestBed pyenv]# pip3 install psutil
Collecting psutil
Using cached psutil-5.7.2.tar.gz (460 kB)
Using legacy 'setup.py install' for psutil, since package 'wheel' is not installed.
Installing collected packages: psutil
Running setup.py install for psutil ... error
ERROR: Command errored out with exit status 1:
command: /pyenv/my_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kptxsdoz/psut il/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kptxsdoz/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 /tm p/pip-record-o82cl8pc/install-record.txt --single-version-externally-managed --compile --install-headers /pyenv/my_env/include/sit e/python3.6/psutil
cwd: /tmp/pip-install-kptxsdoz/psutil/
Complete output (45 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_testutils.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memleaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protec tor-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_LINUX=1 -I/pyenv/my_env/include -I/usr/include/python3.6m -c psutil/_psutil_ common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /pyenv/my_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '" '"'/tmp/pip-install-kptxsdoz/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kptxsdoz/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-o82cl8pc/install-record.txt --single-version-externally-managed --compile --install- headers /pyenv/my_env/include/site/python3.6/psutil Check the logs for full command output.
(my_env) [root#TestBed pyenv]# yum install gcc
Loaded plugins: langpacks, ulninfo
docker-ce-stable | 3.5 kB 00:00:00
ol7_UEKR5 | 2.5 kB 00:00:00
ol7_latest | 2.7 kB 00:00:00
(1/2): ol7_UEKR5/x86_64/updateinfo | 92 kB 00:00:00
(2/2): ol7_UEKR5/x86_64/primary_db | 16 MB 00:00:06
Package gcc-4.8.5-39.0.5.el7.x86_64 already installed and latest version
Nothing to do
(my_env) [root#TestBed pyenv]# pip3 install psutil
Collecting psutil
Using cached psutil-5.7.2.tar.gz (460 kB)
Using legacy 'setup.py install' for psutil, since package 'wheel' is not installed.
Installing collected packages: psutil
Running setup.py install for psutil ... error
ERROR: Command errored out with exit status 1:
command: /pyenv/my_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n7g7gqf_/psut il/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n7g7gqf_/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 /tm p/pip-record-cxodn_6f/install-record.txt --single-version-externally-managed --compile --install-headers /pyenv/my_env/include/sit e/python3.6/psutil
cwd: /tmp/pip-install-n7g7gqf_/psutil/
Complete output (45 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_testutils.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memleaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protec tor-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_LINUX=1 -I/pyenv/my_env/include -I/usr/include/python3.6m -c psutil/_psutil_ common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /pyenv/my_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '" '"'/tmp/pip-install-n7g7gqf_/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n7g7gqf_/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-cxodn_6f/install-record.txt --single-version-externally-managed --compile --install- headers /pyenv/my_env/include/site/python3.6/psutil Check the logs for full command output.
(my_env) [root#TestBed pyenv]#
(my_env) [root#TestBed code]# ./hl.py
Traceback (most recent call last):
File "./hl.py", line 4, in <module>
import psutil
ModuleNotFoundError: No module named 'psutil'

The instructions for Linux include installing the python dev libraries first, then installing psutil:
sudo apt-get install gcc python3-dev
sudo pip3 install psutil
The error you're getting reports missing the python header file which is installed in python3-dev.

Related

"pip install MySQL-python" not working on Ubuntu 20.04

When I try to install MySQL-python using pip for Python 2.7, it is not working anymore on Ubuntu 20.04 - on Ubuntu 18.04 it still works...
Any idea of how I could make this run on Ubuntu 20.04?
I know that Python 2.7 is not supported anymore, but I do still need to run it on my Ubuntu 20.04 server as I am running an older version of Trac which I can't upgrade right now because of plugins that are not working in the latest version...
root#andreas-VirtualBox:/home/andreas# pip install MySQL-python
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip (108 kB)
Building wheels for collected packages: MySQL-python
Building wheel for MySQL-python (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aBO5pH/mysql-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aBO5pH/mysql-python/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-tWAoxI
cwd: /tmp/pip-install-aBO5pH/mysql-python/
Complete output (30 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
_mysql.c:44:10: fatal error: my_config.h: No such file or directory
44 | #include "my_config.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for MySQL-python
Running setup.py clean for MySQL-python
Failed to build MySQL-python
Installing collected packages: MySQL-python
Running setup.py install for MySQL-python ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aBO5pH/mysql-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aBO5pH/mysql-python/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-K48jZF/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/MySQL-python
cwd: /tmp/pip-install-aBO5pH/mysql-python/
Complete output (30 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
_mysql.c:44:10: fatal error: my_config.h: No such file or directory
44 | #include "my_config.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aBO5pH/mysql-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aBO5pH/mysql-python/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-K48jZF/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/MySQL-python Check the logs for full command output.

Python Social Auth Django installation failure

I am trying to install Python Social Auth for Django, but it is not succesful.
Server OS: Ubuntu 14.04.5 LTS (GNU/Linux 2.6.32-042stab141.3 x86_64)
Python version: 3.4.3
Django version (if it matters): 2.0.8
I use pip install social-auth-app-django, and the installation is starting, but after a while I get some errors.
...
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py) ... error
ERROR: Complete output from command /home/ks/priroda-venv/bin/python3.4 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-7c3p58ht/cffi/setup. py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replac e('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec '"'"'))' bdist_wheel -d /tmp/pip-wheel-an_3ux86 --python-tag cp34:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.4/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototype s -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-securit y -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include /ffi -I/usr/include/libffi -I/usr/include/python3.4m -I/home/ks/priroda-venv/inc lude/python3.4m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.4/c/_cffi_back end.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: cffi, cryptography, social-auth-core, social-auth -app-django
Running setup.py install for cffi ... error
ERROR: Complete output from command /home/ks/priroda-venv/bin/python3.4 -u - c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-7c3p58ht/cffi/setu p.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().repl ace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'ex ec'"'"'))' install --record /tmp/pip-record-x424l4as/install-record.txt --single -version-externally-managed --compile --install-headers /home/ks/priroda-venv/in clude/site/python3.4/cffi:
ERROR: running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.4/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.4/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototy pes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-secur ity -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/inclu de/ffi -I/usr/include/libffi -I/usr/include/python3.4m -I/home/ks/priroda-venv/i nclude/python3.4m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.4/c/_cffi_ba ckend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/home/ks/priroda-venv/bin/python3.4 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-7c3p58ht/cffi/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-x424l4as/install-record.txt --single-version-externally-managed --compile --install-headers /home/ks/priroda-venv/include/site/python3.4/cffi" failed with error code 1 in /tmp/pip-install-7c3p58ht/cffi/
What could be done about this?
You are missing ffi headers which are contained in libffi-dev
sudo apt-get install libffi-dev

mysql not connecting into django

I am working on django. it is working good. but now i have to connect mysql database into django. in local system i install all things realted packages. but in virtual enviornment I am getting so much error.
I used this command and getting same errors.
pip install mysqlclient
pip3 install mysqlclient
How can i fixed these errors?
(venv) palwesh#wg-palwesh:~/Workplace/learn/task2$ pip3 install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.4.6.tar.gz (85 kB)
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/webgen-palwesh/Workplace/learn/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xd1syfgb/mysqlclient/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-la3lzm0o
cwd: /tmp/pip-install-xd1syfgb/mysqlclient/
Complete output (31 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.6/MySQLdb
creating build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/MySQLdb
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/include/mysql -I/home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/include -I/usr/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o
MySQLdb/_mysql.c:38:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: /home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xd1syfgb/mysqlclient/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-cqh3ksf2/install-record.txt --single-version-externally-managed --compile --install-headers /home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/include/site/python3.6/mysqlclient
cwd: /tmp/pip-install-xd1syfgb/mysqlclient/
Complete output (31 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-3.6/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-3.6/MySQLdb
creating build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.6/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/MySQLdb
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/include/mysql -I/home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/include -I/usr/include/python3.6m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.6/MySQLdb/_mysql.o
MySQLdb/_mysql.c:38:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xd1syfgb/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xd1syfgb/mysqlclient/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-cqh3ksf2/install-record.txt --single-version-externally-managed --compile --install-headers /home/webgen-palwesh/Workplace/tasks/Task2_Django_admin_panel/venv/include/site/python3.6/mysqlclient Check the logs for full command output.
(venv) palwesh#wg-palwesh:~/Workplace/learn/task2$
This is a pretty common issue -- I recommend ensuring that your virtual development environment has the necessary prerequisites installed.
If you're using Ubuntu or a similar distro, you may need to run sudo apt-get install libssl-dev. After, try running pip install --upgrade setuptools, then pip install mysqlclient.
I had this problem before.
I can suggest two options:
Before installing mysqlclient, install python-dev-tools. this option didn't work for me.
Create virtual environment using anaconda and install mysqlclient. this option worked for me.

Error while installing featuretools on mac

System specification:
MacOS Mojava
Version:10.14.1 (18B75)
I am trying to install featuretools on mac using pip.
Featuretools is a python library used to generate new set of features using the existing features.
command used: python -m pip install featuretools
But I'm getting this error:
error: command 'gcc' failed with exit status 1
Failed building wheel for psutil
Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil, distributed, featuretools
Found existing installation: psutil 5.4.5
Uninstalling psutil-5.4.5:
Successfully uninstalled psutil-5.4.5
Running setup.py install for psutil ... error
Complete output from command /Users/dsnanaware/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/r7/64j7w40s1fn8bmdkblq1pbym0000gn/T/pip-install-tpipbc01/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 /private/var/folders/r7/64j7w40s1fn8bmdkblq1pbym0000gn/T/pip-record-xb78kya7/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_pswindows.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_common.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_psosx.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_psbsd.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_psaix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_pslinux.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_compat.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_psposix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_exceptions.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
copying psutil/_pssunos.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
creating build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
running build_ext
building 'psutil._psutil_osx' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/psutil
creating build/temp.macosx-10.7-x86_64-3.6/psutil/arch
creating build/temp.macosx-10.7-x86_64-3.6/psutil/arch/osx
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/dsnanaware/anaconda3/include -arch x86_64 -I/Users/dsnanaware/anaconda3/include -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=548 -DPSUTIL_OSX=1 -I/Users/dsnanaware/anaconda3/include/python3.6m -c psutil/_psutil_common.c -o build/temp.macosx-10.7-x86_64-3.6/psutil/_psutil_common.o
In file included from /Users/dsnanaware/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0,
from /Users/dsnanaware/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34,
from /Users/dsnanaware/anaconda3/include/python3.6m/Python.h:11,
from psutil/_psutil_common.c:9:
/Users/dsnanaware/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
#include_next <limits.h> /* recurse down to the real one */
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of psutil
Command "/Users/dsnanaware/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/r7/64j7w40s1fn8bmdkblq1pbym0000gn/T/pip-install-tpipbc01/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 /private/var/folders/r7/64j7w40s1fn8bmdkblq1pbym0000gn/T/pip-record-xb78kya7/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/r7/64j7w40s1fn8bmdkblq1pbym0000gn/T/pip-install-tpipbc01/psutil/
Does anyone know how to fix this error??
Thankyou

"Failed building wheel for psutil" when installing Transcrypt for Python

I am trying to install transcrypt into a python virtual environment using pip. Here's what happens:
username#host:~/Pycryptor$ source env/bin/activate
(env) username#host:~/Pycryptor$ pip install transcrypt
Collecting transcrypt
Collecting mypy (from transcrypt)
Using cached mypy-0.560-py3-none-any.whl
Requirement already satisfied: typed-ast<1.2.0,>=1.1.0 in ./env/lib/python3.6/site-packages (from mypy->transcrypt)
Collecting psutil<5.5.0,>=5.4.0 (from mypy->transcrypt)
Using cached psutil-5.4.3.tar.gz
Building wheels for collected packages: psutil
Running setup.py bdist_wheel for psutil ... error
Complete output from command /home/username/Pycryptor/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-izw5bnzb/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/tmpzqu0yyxlpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-i686-3.6
creating build/lib.linux-i686-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_common.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_exceptions.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-i686-3.6/psutil
creating build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-i686-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-i686-3.6
creating build/temp.linux-i686-3.6/psutil
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-XcUuhr/python3.6-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -I/home/username/Pycryptor/env/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-i686-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for psutil
Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil, mypy, transcrypt
Running setup.py install for psutil ... error
Complete output from command /home/username/Pycryptor/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-izw5bnzb/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-q1g8wrzk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/username/Pycryptor/env/include/site/python3.6/psutil:
running install
running build
running build_py
creating build
creating build/lib.linux-i686-3.6
creating build/lib.linux-i686-3.6/psutil
copying psutil/__init__.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psposix.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psosx.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pssunos.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psbsd.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_common.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_compat.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_psaix.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pswindows.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_exceptions.py -> build/lib.linux-i686-3.6/psutil
copying psutil/_pslinux.py -> build/lib.linux-i686-3.6/psutil
creating build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/__init__.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_windows.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/__main__.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_connections.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_bsd.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_posix.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_unicode.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_osx.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_contracts.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_memory_leaks.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_misc.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_aix.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_sunos.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_linux.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_process.py -> build/lib.linux-i686-3.6/psutil/tests
copying psutil/tests/test_system.py -> build/lib.linux-i686-3.6/psutil/tests
running build_ext
building 'psutil._psutil_linux' extension
creating build/temp.linux-i686-3.6
creating build/temp.linux-i686-3.6/psutil
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-XcUuhr/python3.6-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -I/home/username/Pycryptor/env/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-i686-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/username/Pycryptor/env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-izw5bnzb/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-q1g8wrzk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/username/Pycryptor/env/include/site/python3.6/psutil" failed with error code 1 in /tmp/pip-build-izw5bnzb/psutil/
(env) username#host:~/Pycryptor$
Same result when I use pip3.
I have python 3.5 and 3.6 installed. python3-dev version is 3.5.3-1. Python.h is located in /usr/include/python3.5m/Python.h. GCC is already the newest version (4:6.3.0-2ubuntu1).
What could be causing this error:
error: command 'i686-linux-gnu-gcc' failed with exit status 1 ?

Categories