This may or may not be related to the recent post about PyQt and VTK, but I thought I&#39;d start it in a different thread. I&#39;ve also had trouble compiling VTK with VTK_WRAP_PYTHON_SIP. GUISupport/Qt/CMakeLists.txt assumes that the &quot;-t&quot; flag sent to sip should match the current Qt version. But from what I could find online, the &quot;-t&quot; flag does not correspond to the Qt version, but the API version that is being wrapped with sip. The actual value that should be used for the &quot;-t&quot; flag seems to be in PyQt&#39;s pyqtconfig.py:<div>
<br></div><div><div># These are installation specific values created when PyQt4 was configured.</div><div>_pkg_config = {</div><div>    &#39;pyqt_bin_dir&#39;:      &#39;/System/Library/Frameworks/Python.framework/Versions/2.6/bin&#39;,</div>
<div>    &#39;pyqt_config_args&#39;:  &#39;&#39;,</div><div>    &#39;pyqt_mod_dir&#39;:      &#39;/Library/Python/2.6/site-packages/PyQt4&#39;,</div><div>    &#39;pyqt_modules&#39;:      &#39;QtCore QtGui QtHelp QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns phonon QtDesigner&#39;,</div>
<div>    &#39;pyqt_sip_dir&#39;:      &#39;/System/Library/Frameworks/Python.framework/Versions/2.6/share/sip/PyQt4&#39;,</div><div>    &#39;pyqt_sip_flags&#39;:    &#39;-x VendorID -t WS_MACX -x PyQt_NoPrintRangeBug -t Qt_4_6_3 -x Py_v3 -g&#39;,</div>
<div>    &#39;pyqt_version&#39;:      0x040704,</div><div>    &#39;pyqt_version_str&#39;:  &#39;4.7.4&#39;,</div><div>    &#39;qt_data_dir&#39;:       &#39;/usr/local/Qt4.7&#39;,</div><div>    &#39;qt_dir&#39;:            &#39;/&#39;,</div>
<div>    &#39;qt_edition&#39;:        &#39;free&#39;,</div><div>    &#39;qt_framework&#39;:      1,</div><div>    &#39;qt_inc_dir&#39;:        &#39;/usr/include&#39;,</div><div>    &#39;qt_lib_dir&#39;:        &#39;/Library/Frameworks&#39;,</div>
<div>    &#39;qt_threaded&#39;:       1,</div><div>    &#39;qt_version&#39;:        0x040700,</div><div>    &#39;qt_winconfig&#39;:      &#39;shared&#39;</div><div>}</div></div><div><br></div><div>Note the mismatch between the pyqt_sip_flags and pyqt_version_str. When I applied the following patch to explicitly set the flag to what is in pyqt_sip_flags, it worked with no errors:<div>
<div><br></div><div><div>--- a/GUISupport/Qt/CMakeLists.txt</div><div>+++ b/GUISupport/Qt/CMakeLists.txt</div><div>@@ -279,7 +279,8 @@ if(VTK_WRAP_PYTHON_SIP)</div><div>   elseif(Q_WS_MAC)</div><div>     set(SIP_FLAGS ${SIP_FLAGS} -t WS_MACX)</div>
<div>   endif()</div><div>-  set(SIP_FLAGS ${SIP_FLAGS} -t Qt_${QT_VERSION_MAJOR}_${QT_VERSION_MINOR}_0)</div><div>+  set(SIP_FLAGS ${SIP_FLAGS} -t Qt_4_6_3)</div><div>   set(SIP_FLAGS ${SIP_FLAGS}</div><div>     -I ${SIP_PYQT_DIR}</div>
<div>     -I ${CMAKE_CURRENT_SOURCE_DIR}</div>
<div><br></div><div>Anyone know why this mismatch exists? Should the CMakeLists file somehow extract this from pyqtconfig.py instead of assuming the versions match?</div><div><br></div><div>Jeff</div></div></div></div>