Skip to content Skip to sidebar Skip to footer

Python Unable To Import Module Within Library

I'm trying to use the QSerialPort module of PyQt5. Everything I have found has indicated that QtSerial which contains QSerialPort should come with PyQt5. For example, >>>

Solution 1:

Based on this Archlinux forums post I ran pacman -Si python-pyqt5 which gave me a list of optional deps that included the line qt5-serialport: QtSerialPort so I used yay to install qt5-serialport. This is distinct from qt51-serialport, qt5-serialport-595, and in fact any of the AUR packages with serialport in the name that can be found by searching the AUR site, for some reason. Now when I use python on the command line, I can from PyQt5.QtSerialPort import QSerialPort with no error.

I should note that neither the package repo at https://pypi.python.org/simple which PyCharm is using to find installable packages, nor the searchable AUR listing, nor pip seems to show qt5-serialport as an option. So even though I got it downloaded and python can find it from the command-line, it still isn't being imported by PyCharm, which is a separate issue.

Post a Comment for "Python Unable To Import Module Within Library"