Under win864 bit, install python, PyQt4 and sip. (final failure, only record)

The landlord needed to make a crawler because of the business requirement. Python was mainly used as the crawler on the Internet, so the environment was set up. There was no difficulty in installing Python 2.7 itself. On the contrary, when installing pyQT, I have encountered some problems. The mainstream voice on the Internet is to configure and install on the Linux side, less on the Windows side and even less on the Windows 64-bit side. The problems Encountered by the author have not been solved on the Internet. Write it down here and share it with you.

The author saw some examples of PyQt small programs for interface development, feeling simple enough to understand, so the idea of installation occurred. Because the virtual machine is not easy to use, so simply win864 on the busy.
The first step is to install python2.7 without too much difficulty, just download and install it from the official python web site.

Problems occur when install pyQT4 in the url: http://www.riverbankcomputing.com/news software TAB, you can find the pyQT4 download, and download the Windows version of the installer: PyQt – win – the GPL – 4.11. Zip.
When I unzip the package, I find a conap.py file, look up the installation guide, and find that it should be executed first to automatically generate makefiles for later use.

Error 1: PyQt4 installation failure prompt No Module named Sipconfig

Originally want to install PyQt4 even to install a SIP, SIP is also magic – http://www.riverbankcomputing.co.uk/software/sip/intro points out that Python is cow force, because it can use library written in C and C + +, and SIP is the C/C + + library into a Python library artifacts.

Also in the link of http://www.riverbankcomputing.com/news, a software of tag can download the SIP, we choose to download the SIP – 4.16. Zip

When you download and unzip, you’ll find a conap.py file in the package, the same one used to generate makefiles.
After producing the Makefile, we should use the Visual Studio command prompt to execute the nmake instruction.

Problem # 2 is encountered: Make failure — Fatal Error LNK1112: Module computer type “X86” conflicts with target computer type “x64”

Alas, the 64-bit system is no longer compatible with 32-bit software. (I’m not sure, but I probably got the native platform through SYS when I was doing configure, so I set the target platform to X64.)
To observe the configure. Py — — show – platforms. The supporting platforms are found as follows:


Configure.py — Platform Win32-MSVC2010 (my VS command line is version 2010)
Next, nmake compiles successfully!
Then nmake Install finds that the make has been copied to the Python installation directory.

Next, do the same thing for PyQt. Conconfigure. Py. At this point, I encountered problem 3:
Make sure you have a working Qt qmake on your PATH
Yeah, we still can’t, because we don’t have QT.

We installed QT and found that QT also required MinGW support, so we installed MinGW first and then QT.
Finally we have qmake, in the path of the environment variable, add the path of qmake. Exe

Qmake can’t use at this time, however, a problem 4: QMAKESPEC has not had the set, so configuration always be deduced.
The location of the g++ folder at qt needs to be configured as the value of the environment variable QMAKESPEC.
Make configuration: QMAKESPEC = E:\Qt\4.3.4\mkspecs\win32-g++
Execute qmake again, and it works.

Configure again, error. Confivure. Py — — verbose. It was found that there is no environment variable configured with g++, so we need to add g++ path: E:\Program Files\MinGW\bin to the environment variable path.
CMD input, g++ error, say stop working. A query later found g++ is incompatible with win8.

Abandon this path altogether. Turn to

As described in http://blo g.sina.com.cn/s/blog_913c0a8f01010fj7.html, the experience of debugging during a failure can prevent you from making mistakes again. I’m sorry I couldn’t solve the problem.

Read More: