amxNico
amxNico

Reputation: 13

Import problems python/pyqt

Ive got some import problems in python. When I want to import the PyQt5 library I just get the error "No module named 'PyQt5'". The folder is in the path C:\Python\Python37\Lib\PyQt5. I can import tkinter and the folder is in the same path as PyQt5

Code: from PyQt5 import QtCore, QtGui, QtWidgets Error:ModuleNotFoundError: No module named 'PyQt5'

Upvotes: 0

Views: 399

Answers (1)

if you are using a virtual environment, the modules available in a normal machine can't be imported unless you grant permission.

  1. if you are using pycharm, every project is a virtual wrapper. so do install again or change interpreter preference in pycharm (if you installed locally).
  2. Do install again through: 1. terminal: Type pip install PyQt5 2. if you are using pycharm, install from the interpreter preferences.

Upvotes: 0

Related Questions