Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1080

Installing PySide2 breaks existing project which does not use PySide2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.12.2
    • PySide
    • None
    • Linux/X11

    Description

      If I install PySide2, it breaks (debug mode) in existing projects I have, which do not use PySide2 (they use PyQt5).

      I realise this may not be a bug in PySide2 per se.  But I have nowhere else to ask, and you people have been prompt and helpful in my last bug report here, so I'm really hoping someone will read this and offer me some clue...

      I start with the Ubuntu 19.04 distro default Qt 5.12.2, and PyQt 5.12.1 installed.  All is well with this, and has been for a long time.  I can run my Python apps, and debug them fine from PyCharm.

      Trying to begin moving over to PySide2, I install via pip3 install PySide2==5.12.2.  This is a local user install, with everything going into my ~/.local/lib/python3.7/site-packages/.  All goes well.

      I do not change my existing programs.  I am not using PySide2 stuff anywhere, of course.  I can still run them fine, inside or outside of the PyCharm IDE.  When I first enter the IDE I can see it knows new stuff has arrived from pip3 and it re-indexes or whatever everything there, which is normal.

      However, if I try to run under the debugger in PyCharm when it hits line

      db = QtSql.QSqlDatabase.addDatabase("QMYSQL")

      I now get error

      'QSqlDatabase: QMYSQL driver not loaded'

      and cannot proceed.

      If I revert via pip3 uninstall PySide2==5.12.2, which removes:

      {{ /home/jon/.local/bin/pyside2-lupdate}}
      {{ /home/jon/.local/bin/pyside2-rcc}}
      {{ /home/jon/.local/bin/pyside2-uic}}
      {{ /home/jon/.local/lib/python3.7/site-packages/PySide2-5.12.2.dist-info/*}}
      {{ /home/jon/.local/lib/python3.7/site-packages/PySide2/*}}
      {{ /home/jon/.local/lib/python3.7/site-packages/pyside2uic/*}}

      debugging goes back to working normally.

      Since the code does not use PySide2 anything, can anyone tell me what in the world is/might be going on here?  I'm afraid that trying to ask the PyCharm group will get me nowhere, they either won't reply or won't know.

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            jonbrave J Barchan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes