On python's subprocess doc (https://docs.python.org/2/library/subprocess.html) they mention subprocess32 being the best of the best for linux but I can't "sudo apt-get install python-subprocess32" and when I use "pip install subprocess32" I get this output:
Code: Select all
Downloading/unpacking subprocess32
Downloading subprocess32-3.2.7.tar.gz (54kB): 54kB downloaded
Running setup.py (path:/tmp/pip-build-R0XG2J/subprocess32/setup.py) egg_info for package subprocess32
warning: no files found matching '*.h'
no previously-included directories found matching 'build'
no previously-included directories found matching 'dist'
no previously-included directories found matching '.hg*'
Installing collected packages: subprocess32
Running setup.py install for subprocess32
building '_posixsubprocess' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-armv6l-2.7/_posixsubprocess.o
_posixsubprocess.c:3:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-R0XG2J/subprocess32/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-AUFd90-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv6l-2.7
copying subprocess32.py -> build/lib.linux-armv6l-2.7
running build_ext
building '_posixsubprocess' extension
creating build/temp.linux-armv6l-2.7
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-armv6l-2.7/_posixsubprocess.o
_posixsubprocess.c:3:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-R0XG2J/subprocess32/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-AUFd90-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-R0XG2J/subprocess32
Storing debug log for failure in /home/pi/.pip/pip.log