Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to install PyQt5 on raspbian stretch with python 3.6?
Forum Updated to NodeBB v4.3 + New Features

How to install PyQt5 on raspbian stretch with python 3.6?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 6.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alexryan
    wrote on 25 May 2018, 20:52 last edited by alexryan
    #1

    The only way that I was able to get PyQt5 installed and running on raspbian stretch was by installing with apt-get. But that version only appears to work with python 3.5. I need a version that works with python 3.6.

    pip install failed ...

    (qt) pi@qa:~ $ pip install PyQt5
    Collecting PyQt5
      Could not find a version that satisfies the requirement PyQt5 (from versions: )
    No matching distribution found for PyQt5
    
    (qt) pi@qa:~ $ pip install python3-pyqt5
    Collecting python3-pyqt5
      Could not find a version that satisfies the requirement python3-pyqt5 (from versions: )
    No matching distribution found for python3-pyqt5
    
    

    noticed that a version did seem to be available via agt-get

    (qt) pi@qa:~ $ apt-cache search pyqt5
    pyqt5-dev - Development files for PyQt5
    ...
    python-pyqt5 - Python 2 bindings for Qt5
    ...
    python3-dbus.mainloop.pyqt5-dbg - D-Bus Qt main loop support for Python 3 (debug extension)
    python3-pyqt5 - Python 3 bindings for Qt5
    python3-pyqt5-dbg - Python 3 bindings for Qt5 (debug extensions)
    ...
    

    I installed this ...

    (test) pi@qa:~ $ sudo apt-get install python3-pyqt5
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following additional packages will be installed:
      libqt5clucene5 libqt5designer5 libqt5help5 python3-sip
    Suggested packages:
      python3-pyqt5-dbg
    The following NEW packages will be installed:
      libqt5clucene5 libqt5designer5 libqt5help5 python3-pyqt5 python3-sip
    0 upgraded, 5 newly installed, 0 to remove and 21 not upgraded.
    ...
    

    but it seems to have been built against python 3.5 ...

    (qt) pi@qacker:~ $ dpkg -L python3-pyqt5 | grep 35
    /usr/lib/python3/dist-packages/PyQt5/Qt.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtCore.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtDBus.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtDesigner.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtGui.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtHelp.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtNetwork.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtPrintSupport.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtTest.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtWidgets.cpython-35m-arm-linux-gnueabihf.so
    /usr/lib/python3/dist-packages/PyQt5/QtXml.cpython-35m-arm-linux-gnueabihf.so
    

    if you try to use it with python 3.6, the import statement will fail ...

    this works

    >>> import PyQt5
    
    

    but this gives a No Module Found error

    >>> import PyQt5.QtGui
    

    Is it possible to get PyQt5 installed on raspbian stretch for use with python 3.6?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 May 2018, 21:00 last edited by
      #2

      Hi and welcome to devnet,

      That's a question better asked to the PyQt authors on their mailing list.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply 25 May 2018, 21:26
      1
      • S SGaist
        25 May 2018, 21:00

        Hi and welcome to devnet,

        That's a question better asked to the PyQt authors on their mailing list.

        A Offline
        A Offline
        alexryan
        wrote on 25 May 2018, 21:26 last edited by
        #3

        @SGaist Apologies for posting to the wrong spot and thank you for directing me to the correct one. Much appreciated.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 25 May 2018, 21:29 last edited by
          #4

          No worries !

          Don't forget to update this thread when you get an answer so other people can benefit from it :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          1/4

          25 May 2018, 20:52

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved