Configuring PyQt5, fatal error U1077

595 views Asked by At

I'm trying to run the configure.py for PyQt5 from git bash, but it errors out, giving me a Fatal Error U1077. Some other people have encountered this problem, and I've been trying some of the stuff that other people have been saying, but I'm kind of new to this and it's pretty confusing.

Here's what has happened so far

The important section is "fatal error U1077: '.\cl.EXE' : return code '0x000135' " but I don't really know what that means.

2

There are 2 answers

7
syedelec On BEST ANSWER

Here are the complete steps to configure and install PyQt5 from source, you will need first to run command :

python configure.py

At this step, you did not install PyQt5, you only configured it (basically its installation dir, etc...), Do not specify your qmake path.

Next step is to source your environment variables by running in terminal :

"C:\Qt\Qt5.x.x\5.x\msvc2015\bin\qtenv2.bat"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"

Replace the x by your version of Qt. Keep the double quotes, windows does not like spaces ...

Be careful to specify your Visual Studio installation. In windows, "make" is substituted by "nmake" !

the second command will change your path to Visual Studio, just stay in the same terminal and return to your PyQt5 path.

Then you run :

nmake
nmake install

You may encounter an error when you compile QtNfc. Then use :

python configure.py --disable QtNfc

and re-compile everything.

Hope this will helps.

0
Daniele Pantaleone On

You don't need Git Bash to install PyQt5 on Windows you can use the Windows command prompt. Here is a step by step guide to install PyQt5 using Qt5.5 on Windows (if you are interested in a newer version you just need to adapt the paths):

Bring up command prompt window, navigate to the uncompressed SIP directory, and type the following:

> PATH=C:\Qt\5.5\mingw492_32\bin;C:\Qt\Tools\mingw492_32\bin;%PATH%
> python configure.py -p win32-g++
> mingw32-make
> mingw32-make install

Using the same command prompt window, navigate to the uncompressed PyQt5 directory, and type the following:

> python configure.py --spec win32-g++ --disable QtPositioning --no-qsci-api --no-designer-plugin --no-qml-plugin --confirm-license
> mingw32-make
> mingw32-make install

NOTE #1: that disabling QtPositioning is not really necessary, but sometime the compiler complains that it's not able to locate the qgeolocation.h header, so leave it disabled unless you really need it.
NOTE #2: To date, I was not able to compile the 5.7 version of PyQt5, not the 5.6 version (for some unexplainable errors that I couldn't solve). This is why I wrote this little installation tutorial using PyQt5.5.