Tariq
Tariq

Reputation: 101

advice about the PyQt5

Im working on application design using Qt Design. the design completed so now i want to connect it with Python 3.6.4 using pycharm. and import PyQt5. i already installed PyQt5 as you can see.

PS C:\Users\Tariq> pip install pyqt5
Requirement already satisfied :pyqt5 in c:\users\tariq\appdata\local\programs\python\python36-32\lib\site-packages Requirement already satisfied: sip<4.20,>=4.19.4 in c:\users\tariq\appdata\local\programs\python\python36-32\lib\site-packages (from pyqt5)

also i installed PyQt5 inside pycharm as you can see in the picture. Press enter to show the image that PyQt5 installed inside pycharm

My Problem that the PyQt5 unknown for pycharm and this error appear

from PyQt5.QtWidgets import*  
  ModuleNotFoundError: No module named 'PyQt5

'

Upvotes: 0

Views: 918

Answers (2)

Nester
Nester

Reputation: 129

The way that has always worked for me is below.

 from PyQt5 import QtCore, QtGui, QtWidgets

Upvotes: 1

Aula
Aula

Reputation: 121

This maybe due to the way you set up your environment variable add this c:\Python3*\Script,C:\Python3*\Lib\site-packages\, and C:\Python34\Lib\site-packages\PyQt5\ in your environmental path, hope it works. '*` is the version of python e.g Python34

Upvotes: 0

Related Questions