[External] Re: Running PyQt6 with Debug Modules

Johnmichael.Quinlan at idsoftware.com Johnmichael.Quinlan at idsoftware.com
Thu Sep 8 21:43:34 BST 2022

So after much stumbling around I found out the solution to this:

	download python 3.10, PyQt6-6.3.1, PyQt6_sip-13.4, Qt6.3, sip-6.6.2 
	unpack the above sdks to a folder in my case R:\sdks
	run vcvars for vs2019
	add qmake to path, add python to path 
	set PATH=%PATH%;<paths>
	R:\sdks>set PATH=%PATH%;R:\sdks\Qt-6-3\6.3.1\msvc2019_64\bin;R:\sdks\Python-3-10

	install the released module libraries to python 
	R:\sdks>python -m pip install PyQt6, PyQt6_sip, sipbuild 

	build sip in debug
	R:\sdks\sip-6.6.2>python_d.exe ./setup.py build --debug

	build pyqt6_sip in debug
	R:\sdks\PyQt6_sip-13.4.0>python_d.exe ./setup.py build --debug
	rename code_generator_d to remove the version number and just end in .pdb and .pydebug\sipbuild
	copy code_generator_d.* from R:\sdks\sip-6.6.2\build\lib.win-amd64-cpython-310-pydebug\sipbuild to R:\sdks\Python-3-10\Lib\site-packages\sipbuild

	build PyQt6 in debug
	R:\sdks\PyQt6-6.3.1>python_d.exe -m sipbuild.tools.build --debug

	copy the _d.pyd files from the various locations:

	from R:\sdks\PyQt6_sip-13.4.0\build\lib.win-amd64-cpython-310-pydebug\PyQt6 to R:\sdks\Python-3-10\Lib\site-packages\PyQt6
	from R:\sdks\PyQt6-6.3.1\build\...\*_d.pyd to R:\sdks\Python-3-10\Lib\site-packages\PyQt6

	Validate the install by running:

	import PyQt6
	from PyQt6 import QtWidgets

Thanks for all your help. It would be really nice if you shipped debug modules with the installable distributions from sip. 

Many thanks

-----Original Message-----
From: Johnmichael.Quinlan at idsoftware.com <Johnmichael.Quinlan at idsoftware.com> 
Sent: Tuesday, September 06, 2022 7:50 AM
To: Dmitry Shachnev <mitya57 at ubuntu.com>; pyqt at riverbankcomputing.com
Subject: RE: [External] Re: Running PyQt6 with Debug Modules

Any follow up on what the correct way to be able to run PyQt6 with the debug python console would be greatly appreciated?

I'm about to go back to stumbling around in the dark since there isn't any documentation and it doesn't just work out of the box.

-----Original Message-----
From: Dmitry Shachnev <mitya57 at gmail.com> On Behalf Of Dmitry Shachnev
Sent: Friday, August 26, 2022 1:09 PM
To: pyqt at riverbankcomputing.com
Subject: Re: [External] Re: Running PyQt6 with Debug Modules

Hi Florian!

On Fri, Aug 26, 2022 at 06:10:11PM +0200, Florian Bruhin wrote:
> My bad - a normal and debug build of Python do indeed have a different 
> ABI, and thus binary packages aren't compatible. I wasn't aware of 
> that (or I forgot).

Since Python 3.8 it's not the case on Unix-like systems:


But that changelog entry doesn't say anything about Windows.

Dmitry Shachnev

More information about the PyQt mailing list