0

I'm trying to build QT app with python embedded by PythonQT but stuck at building PythonQT.

Here is my environment and what I did:

  • mac os 10.15
  • python 3.8.5 installed by homebrew
  • python-dev-tools installed by pip
  • QT 5.15
  • download PythonQT source code from https://github.com/MeVisLab/pythonqt
  • open PythonQT.pro file in QT Creator (I don't have qmake command available globaly)

I don't have Headers path under /System/Library/Frameworks/Python.framework/, so in python.prf file, I did the following modification:

  • change include path: INCLUDEPATH += /usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Headers
  • change Lib path: LIBS += -F/usr/local/Cellar/python@3.8/3.8.5/Frameworks -framework Python

then:

  • right click project root and select Run qmake
  • right click project root and select build

I got this error:

No rule to make target /Users/xxx/Applications/Qt/5.15.0/clang_64/lib/libQt5UiTools_debug.a', needed by `../../lib/libPythonQt_QtAll-Qt5-Python3.8_d.3.2.0.dylib'.  Stop.

If I use the original python.prf file, build with error the Python.h file not found.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
user3153765
  • 373
  • 4
  • 14

1 Answers1

0

The default build configuration is Debug, change it to Release resolve the issue. Build debug version requires some more twist according to the official doc: https://mevislab.github.io/pythonqt/Building.html

user3153765
  • 373
  • 4
  • 14