如何为 Windows 获取 python-dev?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16448710/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get python-dev for windows?
提问by user1328021
We are trying to install PIL and getting the error
我们正在尝试安装 PIL 并收到错误
error: command 'gcc' failed with exit status 1
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-devpackage.
许多类似的问题,包括这个问题(安装 Reportlab (error: command 'gcc' failed with exit status 1 )),都建议安装python-dev软件包。
Where can this be sourced for Windows 7. pip install python-devdidn't work.
哪里可以为 Windows 7 提供此资源。pip install python-dev不起作用。
回答by Brandon
When I used to develop on Windows, this website with pre-compiled binaries was extremely handy: http://www.lfd.uci.edu/~gohlke/pythonlibs/
当我过去在 Windows 上开发时,这个带有预编译二进制文件的网站非常方便:http: //www.lfd.uci.edu/~gohlke/pythonlibs/
You'll find pre-compiled versions of PIL and ReportLab there. Hope that helps you out.
您会在那里找到 PIL 和 ReportLab 的预编译版本。希望能帮到你。
回答by Charles Brunet
The easiest way to get a complete working setup on Windows, including ming compiler, is to install a distribution such as pythonxy(my favorite) or EDP.
在 Windows 上获得完整工作设置(包括 ming 编译器)的最简单方法是安装诸如pythonxy(我最喜欢的)或EDP 之类的发行版。
回答by ???????
It seems there is no python-devpackage for Windows. But the Python installer for Windows will normally install a sub directory includeinside the main Python dir.
似乎没有python-dev适用于 Windows 的软件包。但是 Windows 的 Python 安装程序通常会include在主 Python 目录中安装一个子目录。
So with Python in C:\Pythonyou would get:
所以使用 PythonC:\Python你会得到:
- 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
- C:\Python
- C:\Python\DLL
- C:\Python\文档
- C:\Python\包括
- C:\Python\Lib
- C:\Python\libs
- C:\Python\脚本
- C:\Python\tcl
- C:\Python\工具
Inside this includedirectory you will find Python.h, which can be included or referenced.
在此include目录中,您会找到Python.h,可以包含或引用它。

