0

I want to debug my PyQt application but I get this error in this line from PyQt5.QtCore import *

/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by ~/.local/lib/python3.8/site-packages/PyQt5/QtCore.abi3.so

This happens ONLY in debugging. Running the file from terminal works fine.

I have two different PyQt install on my system. PyQt 5.12.8 from APT and PyQt 5.15 from PIP. (Ubuntu 20.04) This is not good but I have to leave it like that.

Why my code works if I run directly but I see errors if I want to debug? LD_LIBRARY_PATH and PYTHON_PATH is exactly same. I couldn't find the difference.

VSCode runs this code to start debugging:

/usr/bin/env /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/lib/python/debugpy/launcher 42249 -- app.py 
maydin
  • 195
  • 1
  • 3
  • 15
  • You can refer to this link to check the installation location of "Qt" to ensure that the required Qt version can be found. link: [Error on execution -version `Qt_5' not found required by](https://stackoverflow.com/questions/36128645/error-on-execution-version-qt-5-not-found-required-by) – Jill Cheng Oct 26 '20 at 02:14
  • @JillCheng Everything works if I run program from command line, import fails in debugging only. Also I use PyQt so there is nothing to be compiled. – maydin Oct 26 '20 at 08:30
  • -Since the python debugging function is provided by the python extension, you can try to use the latest version of the python extension or other versions of the python extension. – Jill Cheng Oct 26 '20 at 08:34

0 Answers0