Posts: 7,319
Threads: 123
Joined: Sep 2016
Apr-14-2022, 07:31 PM
(This post was last modified: Apr-14-2022, 07:47 PM by snippsat.)
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
Posts: 19
Threads: 5
Joined: Apr 2022
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'
Posts: 19
Threads: 5
Joined: Apr 2022
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?
Posts: 7,319
Threads: 123
Joined: Sep 2016
(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.
Posts: 7,319
Threads: 123
Joined: Sep 2016
Apr-16-2022, 03:05 PM
(This post was last modified: Apr-16-2022, 03:06 PM by snippsat.)
(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.
Posts: 19
Threads: 5
Joined: Apr 2022
(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.
Posts: 19
Threads: 5
Joined: Apr 2022
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
Posts: 7,319
Threads: 123
Joined: Sep 2016
Apr-16-2022, 05:45 PM
(This post was last modified: Apr-16-2022, 05:45 PM by snippsat.)
(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
Posts: 19
Threads: 5
Joined: Apr 2022
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.
Posts: 19
Threads: 5
Joined: Apr 2022
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!
|