Python Forum
Installing Qt for Python. (On Windows 10)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing Qt for Python. (On Windows 10)
#17
Hi I'm now using pyCharm, and it looks great. It can't find my module pyside6. Here's the problem :

import sys
import random
from PySide6 import QtCore, QtWidgets, QtGui


class MyWidget(QtWidgets.QWidget):
    def __init__(self):
        super().__init__()

        self.hello = ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]

        self.button = QtWidgets.QPushButton("Click me!")
        self.text = QtWidgets.QLabel("Hello World",
                                     alignment=QtCore.Qt.AlignCenter)

        self.layout = QtWidgets.QVBoxLayout(self)
        self.layout.addWidget(self.text)
        self.layout.addWidget(self.button)

        self.button.clicked.connect(self.magic)

    @QtCore.Slot()
    def magic(self):
        self.text.setText(random.choice(self.hello))


if __name__ == "__main__":
    app = QtWidgets.QApplication([])

    widget = MyWidget()
    widget.resize(800, 600)
    widget.show()

    sys.exit(app.exec())
Produces the following error :
Error:
C:\Users\GreenBus\PycharmProjects\vapeomatic\venv\Scripts\python.exe C:/Users/GreenBus/PycharmProjects/vapeomatic/main.py Traceback (most recent call last): File "C:\Users\GreenBus\PycharmProjects\vapeomatic\main.py", line 3, in <module> from PySide6 import QtCore, QtWidgets, QtGui ModuleNotFoundError: No module named 'PySide6' Process finished with exit code 1
Reply


Messages In This Thread
RE: Installing Qt for Python. (On Windows 10) - by davediamond - Apr-16-2022, 04:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing auto-sklearn on Windows 10 Led_Zeppelin 1 2,773 Apr-15-2021, 08:02 PM
Last Post: bowlofred
  Need help installing infoblox-client on Windows 10 dazmac10 1 2,616 Mar-07-2021, 10:57 PM
Last Post: snippsat
  error while installing any library using pip in windows AkashKansal 1 4,537 Sep-24-2020, 07:51 AM
Last Post: buran
  installing python in windows 10 martynarthur2102 1 1,716 Aug-22-2020, 01:53 PM
Last Post: buran
  Installing pip windows 10 jcg36 9 5,334 Sep-13-2019, 12:44 PM
Last Post: snippsat
  pip not installing any package on windows royhimo855 0 3,195 Dec-10-2018, 07:58 AM
Last Post: royhimo855
  Installing and running a python web scraping app from github to a windows 8.1 system eugenioca 17 8,660 Oct-06-2018, 08:14 AM
Last Post: eugenioca
  Error while installing python3.6.4 on windows 10 SaurabhMaheshwari 1 4,243 Feb-18-2018, 09:36 PM
Last Post: sparkz_alot
  pip installing package using c++ boost in windows 6hearts 2 4,517 Feb-16-2018, 06:09 PM
Last Post: 6hearts
  Installing cartopy on Windows 10 varung1985 1 6,142 Mar-27-2017, 11:01 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020