I am trying to install the subprocess32 python module (https://github.com/google/python-subprocess32) and am having some issues with distutils. The module includes a C extension that has to be built, but when I run either pip install .
or python setup.py install
I get the following output:
...
creating build
creating build/temp.linux-x86_64-2.7
/non/existent/path/gcc -pthread -fPIC ... -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
unable to execute '/non/existent/path/gcc': No such file or directory
Obviously distutils is using the wrong path to gcc for some reason. I then tried to manually specify the right path to gcc using export CC=/correct/path/to/gcc
and I get this output:
building '_posixsubprocess' extension
creating build/temp.linux-x86_64-2.7
/correct/path/to/gcc -fPIC -fno-strict-aliasing -g -O2 ... -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
/non/existent/path/gcc -pthread -shared ... build/temp.linux-x86_64-2.7/_posixsubprocess.o -o build/lib.linux-x86_64-2.7/_posixsubprocess.so
unable to execute '/non/existent/path/gcc': No such file or directory
The original problematic command is now using the correct path, but it is still trying to use the incorrect location of gcc to build the shared library. Is there another environment variable I need to specify to correct this behaviour?