Ask Your Question

PyQt5 isn't working for python3 but it works with python

asked 2016-10-16 16:47:30 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I'm using fedora 24. I've installed PyQt5. But it doesn't work with python3 (e.g. python 3.5). But it works with python (e.g python 2.7).

Please check below:

**[rumi@localhost Calculator]$** python

**[rumi@localhost Calculator]$** python3

Traceback (most recent call last):
  File "", line 9, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: No module named 'PyQt5'

**[rumi@localhost Calculator]$**

When I use "python" command, it works great! But when I use "python3" command, I get error!

Can anyone help please?

edit retag flag offensive close merge delete


Did you install python3-qt5 package? (There are always two packages for python modules in Fedora -- python-foo for Python 2 and python3-foo for Python3.)

vtrefny gravatar imagevtrefny ( 2016-10-17 01:04:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-18 02:53:51 -0500

smearumi gravatar image

yes! I installed all possible packages from dnf repository for python3. Also, I tries pip/pip3! But that didn't work. Anyway, my problem is solved. I've compiled and installed PyQt5 and python 3.5.2 respectively from the source. It's working okay right now. Thank you very much for your attention to this matter and for the comment! :)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-10-16 16:47:30 -0500

Seen: 461 times

Last updated: Oct 18 '16