Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get python-dev for windows?

Tags:

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.

like image 843
user1328021 Avatar asked May 08 '13 19:05

user1328021


People also ask

How do I download Python IDE for Windows?

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.

What is python3 dev?

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.


2 Answers

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:

  • C:\Python
  • C:\Python\DLLs
  • C:\Python\Doc
  • C:\Python\include
  • C:\Python\Lib
  • C:\Python\libs
  • C:\Python\Scripts
  • C:\Python\tcl
  • C:\Python\Tools

Inside this include directory you will find Python.h, which can be included or referenced.

like image 116
ᴠɪɴᴄᴇɴᴛ Avatar answered Dec 25 '22 14:12

ᴠɪɴᴄᴇɴᴛ


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.

like image 28
Brandon Avatar answered Dec 25 '22 14:12

Brandon