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)
#11
davediamond Wrote:I now have the following running on my pc :

(pq_env) C:\Users\GreenBus\myPython\pq_env>
Then you install and test that it work.
(pq_env) G:\div_code\pq_env
λ pip install pyside6
Collecting pyside6
  Downloading PySide6-6.2.4-6.2.4-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl (156.6 MB)
     ---------------------------------------- 156.6/156.6 MB 2.0 MB/s eta 0:00:00
Collecting shiboken6==6.2.4
  Downloading shiboken6-6.2.4-6.2.4-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl (2.3 MB)
     ---------------------------------------- 2.3/2.3 MB 3.6 MB/s eta 0:00:00
Installing collected packages: shiboken6, pyside6
Successfully installed pyside6-6.2.4 shiboken6-6.2.4

# Test that it work
(pq_env) G:\div_code\pq_env
λ python
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide6 import QtCore, QtWidgets, QtGui
>>> import PySide6
>>>
>>> PySide6.__version__
'6.2.4'
>>> exit()

(pq_env) G:\div_code\pq_env
This will also install Qt Designer was separate install before.
Start Designer like this.
(pq_env) G:\div_code\pq_env
λ pyside6-designer
Reply
#12
https://doc.qt.io/qtforpython/gettingsta...ndows.html

python -m venv testenv
call testenv\Scripts\activate
pip install -r requirements.txt  # General dependencies, documentation, and examples.
The third line of the above code produces this :

Error:
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
Reply
#13
Hello gang!

Can Python/Ecipse/pyDev offer Visual Basic, code tips/completion, whatever in the IDE, as well as being able to access documents here on my PC, or will I have to use the web?
Reply
#14
(Apr-16-2022, 02:21 PM)davediamond Wrote: https://doc.qt.io/qtforpython/gettingsta...ndows.html
Why are doing this,there is no need to build from source.

All you need to do is follow what i do in post #11
Also when environment is active(pq_env) as your post show it is:
(Apr-16-2022, 02:21 PM)davediamond Wrote: (pq_env) C:\Users\GreenBus\myPython\pq_env>
Then you do this command in folder over:
pip install pyside6
Then all of PySide6(Qt for Python) is ready for use.
Reply
#15
(Apr-16-2022, 02:24 PM)davediamond Wrote: Can Python/Ecipse/pyDev offer Visual Basic, code tips/completion, whatever in the IDE, as well as being able to access documents here on my PC, or will I have to use the web?
Yes Pydev has tips/completion,but it's not the most popular Python Editor.
VS Code and PyCharm are the two big ones for Python.
I use VS Code have tutorial here VS Code from start.
Reply
#16
(Apr-16-2022, 03:05 PM)snippsat Wrote:
(Apr-16-2022, 02:24 PM)davediamond Wrote: Can Python/Ecipse/pyDev offer Visual Basic, code tips/completion, whatever in the IDE, as well as being able to access documents here on my PC, or will I have to use the web?
Yes Pydev has tips/completion,but it's not the most popular Python Editor.
VS Code and PyCharm are the two big ones for Python.
I use VS Code have tutorial here VS Code from start.

Thanks for the timely reply. In answer to your question about building the source code, I started following the tutorial, and I thought it was necessary...so my mistake then! Also, I'm now going to try PyCharm, but not VS Code, as I don't use MS products, other than Windows.
Reply
#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
#18
(Apr-16-2022, 04:31 PM)davediamond Wrote: but not VS Code, as I don't use MS products, other than Windows.
That make no sense at all,just so know so is VS Code Open Source ("Code - OSS") and work on all OS(windows,Linux,Mac).

(Apr-16-2022, 04:31 PM)davediamond Wrote: Hi I'm now using pyCharm, and it looks great. It can't find my module pyside6. Here's the problem :
Look at Configure a Python interpreter you are now making a new virtual environment(PyCharm dos this automatically).
Choose the virtual environment you already made,the path for to your executable will be:
C:\Users\GreenBus\myPython\pq_env\Scripts\python.exe
Setting an existing Python interpreter
Reply
#19
Hi,

I didn't know VSCode was open source, but I decided on trying pyCharm, as per your advice. I want to start coding now, and to start I've drawn out some forms which will provide the interface.

[Image: image-2022-04-16-201940291.png]
Reply
#20
The app is a version of a balance sheet, which keeps track of withdrawals and deposits, actually of vapes for patients, as patients can't smoke or keep smokes. So, later I'll show you the form...

I've decided to use XML as the apps data source/database.

A problem I have is deciding to 'squeeze' all the info onto one line, and store it onto disk as a single element or have another element especially for the patients balance.

Please stay tuned till Monday, or later tonight, and I'll show you an image of the form. Please contain your excitement!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing auto-sklearn on Windows 10 Led_Zeppelin 1 2,676 Apr-15-2021, 08:02 PM
Last Post: bowlofred
  Need help installing infoblox-client on Windows 10 dazmac10 1 2,542 Mar-07-2021, 10:57 PM
Last Post: snippsat
  error while installing any library using pip in windows AkashKansal 1 4,408 Sep-24-2020, 07:51 AM
Last Post: buran
  installing python in windows 10 martynarthur2102 1 1,658 Aug-22-2020, 01:53 PM
Last Post: buran
  Installing pip windows 10 jcg36 9 5,128 Sep-13-2019, 12:44 PM
Last Post: snippsat
  pip not installing any package on windows royhimo855 0 3,137 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,238 Oct-06-2018, 08:14 AM
Last Post: eugenioca
  Error while installing python3.6.4 on windows 10 SaurabhMaheshwari 1 4,120 Feb-18-2018, 09:36 PM
Last Post: sparkz_alot
  pip installing package using c++ boost in windows 6hearts 2 4,404 Feb-16-2018, 06:09 PM
Last Post: 6hearts
  Installing cartopy on Windows 10 varung1985 1 6,049 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