We are trying to install PIL and getting the error
error: command 'gcc' failed with exit status 1
Many similar questions, including this one (installing Reportlab (error: command 'gcc' failed with exit status 1 )), suggest installing the python-dev
package.
Where can this be sourced for Windows 7. pip install python-dev
didn't work.
To install it, visit the PyCharm IDE website, download the installer, and run it. The process is the same as with Python: start the installer, allow Windows to install a non-Microsoft application, and wait for the installer to finish.
python-dev is the package that contains the header files for the Python C API, which is used by lxml because it includes Python C extensions for high performance.
It seems there is no python-dev
package for Windows. But the Python installer for Windows will normally install a sub directory include
inside the main Python dir.
So with Python in C:\Python
you would get:
Inside this include
directory you will find Python.h
, which can be included or referenced.
When I used to develop on Windows, this website with pre-compiled binaries was extremely handy: http://www.lfd.uci.edu/~gohlke/pythonlibs/
You'll find pre-compiled versions of PIL and ReportLab there. Hope that helps you out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With