在Windows 10上安装Python for Python 2.7

我已经看到了很多含糊不清的线索,从原始问题的切线出发,经常假设作者的能力很多,所以我希望如果我对我的信息直接和简洁,我会得到一个答案这是符合要求的。 我知道,严肃的程序员会看到很多次,有很多种格式,所以请耐心等待,因为这是我的头。请不要只是发布一个其他答案的链接,因为我很less发现,这有助于我当前的问题。

我不是一个铁杆程序员,我发现编译,源码,焦油,GZ所有的废话是诚实的,我正在寻找最简单的方法来安装SIP在我的机器上的python。 我已经安装了各种版本的mingw32,mingw64,我不知道哪一个最好用。 我假设在这里: C:\ Program Files \ mingw-w64是一个,考虑到我正在使用64位,但我已经安装了其他人的影响呢?

我也安装了mysys的版本:C:\ msys \ 1.0,C:\ msys64,但是我仍然不清楚是什么原因等原因,尽pipe试图阅读随附的文档。

我有Windows 10,64位专业版。 我有python 2.7我在各个位置安装了mingw,32位和64位,主要是由于不完全了解到底是什么或应该去哪里。 我发现它的拉链和exes,所以我有点困惑。

我下载了sip软件包,并将其解压缩到这里: C:\ Python27 \ Lib \ site-packages \ sip-4.19.3 ,它里面有configure.py文件。 到现在为止还挺好。

我使用了一个CMD窗口,将目录改为:C:\ Python27 \ Lib \ site-packages \ sip-4.19.3,然后使用命令:python configure.py来创build我认为应该发生的Makefile文件。

然后我打开了mingw64 shell,把目录改为上面的sip文件夹,然后再次input: python configure.py ,只是为了确定我会得到一个响应并重新创build文件,可能不应该这样做,但是嘿嘿,这一点,我对此感到非常沮丧,并试图用我所拥有的东西去做任何事情,我知道这是不好的做法。 (见图1) image 1:执行configure.py

从我读过的内容来看,我应该使用Mingw64自带的make函数,但是我尝试了下面的代码,其中也包括了configure.py代码,但是在尝试使用通过configure创build的Makefile文件时似乎没有任何作用.py进程。

c:\Python27>cd ./Lib/site-packages/sip-4.19.3 c:\Python27\Lib\site-packages\sip-4.19.3> python configure.py This is SIP 4.19.3 for Python 2.7.13 on win32. The SIP code generator will be installed in C:\Python27. The sip module will be installed in C:\Python27\Lib\site-packages. The sip.pyi stub file will be installed in C:\Python27\Lib\site-packages. The sip.h header file will be installed in C:\Python27\include. The default directory to install .sip files in is C:\Python27\sip. Creating siplib\sip.h... Creating siplib\siplib.c... Creating siplib\siplib.sbf... Creating sipconfig.py... Creating top level Makefile... Creating sip code generator Makefile... Creating sip module Makefile... c:\Python27\Lib\site-packages\sip-4.19.3> Makefile 'Makefile' is not recognized as an internal or external command, operable program or batch file. c:\Python27\Lib\site-packages\sip-4.19.3> make Makefile make: Nothing to be done for `Makefile'. c:\Python27\Lib\site-packages\sip-4.19.3> Makefile Makefile 'Makefile' is not recognized as an internal or external command, operable program or batch file. c:\Python27\Lib\site-packages\sip-4.19.3> 

所以现在我陷入了僵局。 我在我的path环境variables中具有我的mingw版本和msys的位置,而且我已经完成了我在网上查看的所有内容。 我意识到这是一个顺序的事情,但我真的希望只有这些模块和支持工具的可执行文件,因为这个编译是一个球疼。我试着打开一个python shell并导入sip。

 >>> import os, sys >>> import sip Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import sip ImportError: No module named sip >>> import sipconfig Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> import sipconfig ImportError: No module named sipconfig >>> from sip import sip Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> from sip import sip ImportError: No module named sip >>> from sipconfig impport sip SyntaxError: invalid syntax >>> from sip import * Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> from sip import * ImportError: No module named sip 

所以,如果有人已经读过这个,并且对我做错了什么有一个明确的答案,我将不胜感激。