Open changchichung opened 2 years ago
Check out this blog post: https://www.apalrd.net/posts/2022/raspi_spice_vdi/#setup-for-raspberry-pi
Let me know if this helps.
On Tue, Apr 19, 2022 at 7:22 PM Eric Chang @.***> wrote:
my OS info
Linux phicomm-n1 5.9.0-arm-64 #20.11 SMP PREEMPT Sat Nov 21 20:50:45 CST 2020 aarch64 aarch64 aarch64 GNU/Linux
Welcome to Armbian 20.11 Focal with Linux 5.9.0-arm-64
No end-user support: built from trunk
System load: 2% Up time: 14:10
Memory usage: 15% of 1.70G IP: 169.254.9.222 192.168.11.185
CPU temp: 56°C Usage of /: 83% of 6.0G
[ General system configuration (beta): armbian-config ]
running requirements.sh
@.***:~/git/PVE-VDIClient$ ./requirements.sh
Collecting proxmoxer
Downloading proxmoxer-1.3.0-py3-none-any.whl (14 kB)
Installing collected packages: proxmoxer
Successfully installed proxmoxer-1.3.0
Collecting PySimpleGUIQt
Downloading PySimpleGUIQt-0.35.0-py3-none-any.whl (82 kB)
|████████████████████████████████| 82 kB 172 kB/s
ERROR: Could not find a version that satisfies the requirement pyside2 (from PySimpleGUIQt) (from versions: none)
ERROR: No matching distribution found for pyside2 (from PySimpleGUIQt)
any suggestions ??
— Reply to this email directly, view it on GitHub https://github.com/joshpatten/PVE-VDIClient/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIP64QEXL27IGWJVBAYLJTVF5E2ZANCNFSM5T2NHZSQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
not working in my case.
Can you post the output of the commands?
On Wed, Apr 20, 2022, 2:44 AM Eric Chang @.***> wrote:
not working in my case.
— Reply to this email directly, view it on GitHub https://github.com/joshpatten/PVE-VDIClient/issues/12#issuecomment-1103575069, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIP64SQ5XPWP6R3T6DRALDVF6YWRANCNFSM5T2NHZSQ . You are receiving this because you commented.Message ID: @.***>
OK I made a change to fallback to Tkinter if QT is not available. Pull the latest file and run:
pip3 install PySimpleGUI
And run it again. Let me know if it works.
nothing different
chchang@phicomm-n1:~/git/PVE-VDIClient$ ./requirements.sh
Collecting proxmoxer
Downloading proxmoxer-1.3.0-py3-none-any.whl (14 kB)
Installing collected packages: proxmoxer
Successfully installed proxmoxer-1.3.0
Collecting PySimpleGUIQt
Downloading PySimpleGUIQt-0.35.0-py3-none-any.whl (82 kB)
|████████████████████████████████| 82 kB 163 kB/s
ERROR: Could not find a version that satisfies the requirement pyside2 (from PySimpleGUIQt) (from versions: none)
ERROR: No matching distribution found for pyside2 (from PySimpleGUIQt)
chchang@phicomm-n1:~/git/PVE-VDIClient$ pip3 install PySimpleGUI
Collecting PySimpleGUI
Downloading PySimpleGUI-4.59.0-py3-none-any.whl (493 kB)
|████████████████████████████████| 493 kB 773 kB/s
Installing collected packages: PySimpleGUI
Successfully installed PySimpleGUI-4.59.0
chchang@phicomm-n1:~/git/PVE-VDIClient$ ./requirements.sh
Requirement already satisfied: proxmoxer in /home/chchang/.local/lib/python3.8/site-packages (1.3.0)
Collecting PySimpleGUIQt
Using cached PySimpleGUIQt-0.35.0-py3-none-any.whl (82 kB)
ERROR: Could not find a version that satisfies the requirement pyside2 (from PySimpleGUIQt) (from versions: none)
ERROR: No matching distribution found for pyside2 (from PySimpleGUIQt)
chchang@phicomm-n1:~/git/PVE-VDIClient$
well , I found something interesting.. I downgrade the python from 3.8 to 3.8 using pyenv
chchang@phicomm-n1:~/git/PVE-VDIClient$ pyenv local 3.7.13
chchang@phicomm-n1:~/git/PVE-VDIClient$ cd
chchang@phicomm-n1:~$ cd git/PVE-VDIClient/
chchang@phicomm-n1:~/git/PVE-VDIClient$ python -V
Python 3.7.13
then run the requirements.sh
chchang@phicomm-n1:~/git/PVE-VDIClient$ ./requirements.sh
Collecting proxmoxer
Using cached proxmoxer-1.3.0-py3-none-any.whl (14 kB)
Installing collected packages: proxmoxer
Successfully installed proxmoxer-1.3.0
Collecting PySimpleGUIQt
Using cached PySimpleGUIQt-0.35.0-py3-none-any.whl (82 kB)
Downloading PySimpleGUIQt-0.34.0-py3-none-any.whl (81 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.5/81.5 KB 948.2 kB/s eta 0:00:00
Downloading PySimpleGUIQt-0.33.0-py3-none-any.whl (81 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.3/81.3 KB 2.6 MB/s eta 0:00:00
Downloading PySimpleGUIQt-0.32.0-py3-none-any.whl (81 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.1/81.1 KB 3.2 MB/s eta 0:00:00
Downloading PySimpleGUIQt-0.31.0-py3-none-any.whl (79 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.1/79.1 KB 3.2 MB/s eta 0:00:00
Downloading PySimpleGUIQt-0.30.0-py3-none-any.whl (73 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.3/73.3 KB 2.8 MB/s eta 0:00:00
Installing collected packages: PySimpleGUIQt
Successfully installed PySimpleGUIQt-0.30.0
chchang@phicomm-n1:~/git/PVE-VDIClient$
damn , PySimpleGUIQt-0.30.0 successfully installed !?!?
but ,unfortunately , vdiclient.py is still not working.
chchang@phicomm-n1:~/git/PVE-VDIClient$ ./vdiclient.py
Traceback (most recent call last):
File "./vdiclient.py", line 4, in <module>
import PySimpleGUIQt as sg # pip install PySimpleGUIQt
ModuleNotFoundError: No module named 'PySimpleGUIQt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./vdiclient.py", line 6, in <module>
import PySimpleGUI as sg # pip install PySimpleGUI
File "/home/chchang/.local/lib/python3.8/site-packages/PySimpleGUI/__init__.py", line 2, in <module>
from .PySimpleGUI import *
File "/home/chchang/.local/lib/python3.8/site-packages/PySimpleGUI/PySimpleGUI.py", line 128, in <module>
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
it still use python3.8 , so I update vdiclient.py to use pyenv python. then here comes some different error messages
chchang@phicomm-n1:~/git/PVE-VDIClient$ ./vdiclient.py
Traceback (most recent call last):
File "./vdiclient.py", line 5, in <module>
import PySimpleGUIQt as sg # pip install PySimpleGUIQt
File "/home/chchang/.pyenv/versions/3.7.13/lib/python3.7/site-packages/PySimpleGUIQt/__init__.py", line 2, in <module>
from .PySimpleGUIQt import *
File "/home/chchang/.pyenv/versions/3.7.13/lib/python3.7/site-packages/PySimpleGUIQt/PySimpleGUIQt.py", line 22, in <module>
from PySide2.QtWidgets import QApplication, QLabel, QWidget, QLineEdit, QComboBox, QFormLayout, QVBoxLayout, QHBoxLayout, QListWidget, QDial, QTableWidget
ModuleNotFoundError: No module named 'PySide2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./vdiclient.py", line 7, in <module>
import PySimpleGUI as sg # pip install PySimpleGUI
File "/home/chchang/.pyenv/versions/3.7.13/lib/python3.7/site-packages/PySimpleGUI/__init__.py", line 2, in <module>
from .PySimpleGUI import *
File "/home/chchang/.pyenv/versions/3.7.13/lib/python3.7/site-packages/PySimpleGUI/PySimpleGUI.py", line 128, in <module>
import tkinter as tk
File "/home/chchang/.pyenv/versions/3.7.13/lib/python3.7/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
no need to use pyenv to create virtualenv
sudo apt install python3-pyside2.qt3dcore python3-pyside2.qt3dinput python3-pyside2.qt3dlogic python3-pyside2.qt3drender python3-pyside2.qtcharts libpyside2-py3-5.14 python3-tk
chchang@phicomm-n1:~/git/PVE-VDIClient$ cat requirements.sh
#!/bin/bash
pip3 install proxmoxer
#pip3 install PySimpleGUIQt
pip3 install PySimpleGUI
running requirement.sh
chchang@phicomm-n1:~/git/PVE-VDIClient$ bash requirements.sh
Collecting proxmoxer
Using cached proxmoxer-1.3.0-py3-none-any.whl (14 kB)
Installing collected packages: proxmoxer
Successfully installed proxmoxer-1.3.0
Collecting PySimpleGUI
Using cached PySimpleGUI-4.59.0-py3-none-any.whl (493 kB)
Installing collected packages: PySimpleGUI
Successfully installed PySimpleGUI-4.59.0
running vdiclient.py without a config
copy ini example to specified path and run vdiclient.py again , DAMN !!
error messages here
chchang@phicomm-n1:~/git/PVE-VDIClient$ ./vdiclient.py
Traceback (most recent call last):
File "./vdiclient.py", line 430, in <module>
sys.exit(main())
File "./vdiclient.py", line 420, in main
loggedin = loginwindow()
File "./vdiclient.py", line 346, in loginwindow
event, values = window.read()
File "/home/chchang/.local/lib/python3.8/site-packages/PySimpleGUI/PySimpleGUI.py", line 9804, in read
results = self._read(timeout=timeout, timeout_key=timeout_key)
File "/home/chchang/.local/lib/python3.8/site-packages/PySimpleGUI/PySimpleGUI.py", line 9870, in _read
self._Show()
File "/home/chchang/.local/lib/python3.8/site-packages/PySimpleGUI/PySimpleGUI.py", line 9614, in _Show
StartupTK(self)
File "/home/chchang/.local/lib/python3.8/site-packages/PySimpleGUI/PySimpleGUI.py", line 16280, in StartupTK
_convert_window_to_tk(window)
File "/home/chchang/.local/lib/python3.8/site-packages/PySimpleGUI/PySimpleGUI.py", line 16167, in _convert_window_to_tk
PackFormIntoFrame(window, master, window)
File "/home/chchang/.local/lib/python3.8/site-packages/PySimpleGUI/PySimpleGUI.py", line 14477, in PackFormIntoFrame
tktext_label = element.Widget = tk.Label(tk_row_frame, textvariable=stringvar, width=width,
File "/usr/lib/python3.8/tkinter/__init__.py", line 3148, in __init__
Widget.__init__(self, master, 'label', cnf, kw)
File "/usr/lib/python3.8/tkinter/__init__.py", line 2572, in __init__
self.tk.call(
_tkinter.TclError: expected integer but got "18.0"
chchang@phicomm-n1:~/git/PVE-VDIClient$
looks like we are almost there !
No i meant to run the command i posted in my last comment and then try running the program
On Wed, Apr 20, 2022, 7:04 PM Eric Chang @.***> wrote:
nothing different
@.***:~/git/PVE-VDIClient$ ./requirements.sh
Collecting proxmoxer
Downloading proxmoxer-1.3.0-py3-none-any.whl (14 kB)
Installing collected packages: proxmoxer
Successfully installed proxmoxer-1.3.0
Collecting PySimpleGUIQt
Downloading PySimpleGUIQt-0.35.0-py3-none-any.whl (82 kB)
|████████████████████████████████| 82 kB 163 kB/s
ERROR: Could not find a version that satisfies the requirement pyside2 (from PySimpleGUIQt) (from versions: none)
ERROR: No matching distribution found for pyside2 (from PySimpleGUIQt)
@.***:~/git/PVE-VDIClient$ pip3 install PySimpleGUI
Collecting PySimpleGUI
Downloading PySimpleGUI-4.59.0-py3-none-any.whl (493 kB)
|████████████████████████████████| 493 kB 773 kB/s
Installing collected packages: PySimpleGUI
Successfully installed PySimpleGUI-4.59.0
@.***:~/git/PVE-VDIClient$ ./requirements.sh
Requirement already satisfied: proxmoxer in /home/chchang/.local/lib/python3.8/site-packages (1.3.0)
Collecting PySimpleGUIQt
Using cached PySimpleGUIQt-0.35.0-py3-none-any.whl (82 kB)
ERROR: Could not find a version that satisfies the requirement pyside2 (from PySimpleGUIQt) (from versions: none)
ERROR: No matching distribution found for pyside2 (from PySimpleGUIQt)
@.***:~/git/PVE-VDIClient$
— Reply to this email directly, view it on GitHub https://github.com/joshpatten/PVE-VDIClient/issues/12#issuecomment-1104565326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4U7MBLQCM6K3MBDEOVDVDVGCLPLANCNFSM5T2NHZSQ . You are receiving this because you commented.Message ID: @.***>
-- https://www.westparkcom.net https://www.westparkcom.net/
https://www.facebook.com/Westparkcom https://plus.google.com/115805397773385459794 https://www.linkedin.com/company-beta/854512/ https://twitter.com/westparkcom
Confidentiality Notice: The information contained in or attached to this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately and delete the message as received.
OK I made a change to fix this, please pull the latest version.
I still can not install PySimpleGUIQt , so I have to update requirement.sh to install PySimpleGUI
#!/bin/bash
pip3 install proxmoxer
#pip3 install PySimpleGUIQt
pip3 install PySimpleGUI
after that , and with your latest commit , it works !! thanks !
I think what I'm going to do is modify the requirements script to only install pysimplegui on ARM based systems because of the difficulty in getting Qt installed on ARM. Thanks for your help!
On Thu, Apr 21, 2022, 8:26 PM Eric Chang @.***> wrote:
I still can not install PySimpleGUIQt , so I have to update requirement.sh to install PySimpleGUI
!/bin/bash
pip3 install proxmoxer
pip3 install PySimpleGUIQt
pip3 install PySimpleGUI
after that , and with your latest commit , it works !! thanks !
— Reply to this email directly, view it on GitHub https://github.com/joshpatten/PVE-VDIClient/issues/12#issuecomment-1105913205, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIP64U4PDOG6GKAYZRP25DVGH55ZANCNFSM5T2NHZSQ . You are receiving this because you commented.Message ID: @.***>
It seems like it's an issue upstream really (I found the same issue on Alpine Linux as I found on the Pi).
pip tries to install PySide2 and can't find a wheel that it thinks is compatible with your OS/arch, so it installs PySimpleGUIQt 0.30.0 (the last revision that didn't depend on PySide2). This doesn't work since it's really old.
You can install PySide2 through apt on Pi (or apk on Alpine) but pip doesn't realize it's installed outside of Pip so it still won't update to the latest PySimpleGUIQt. It's not hard since PySide2 is in the repos, but Pip can't figure that out.
My solution is to install PySimpleGUIQt at default (so it installs dependencies), then install ==0.35.0 --no-deps to upgrade version (at which point the app would try to load library and fail), and rely on the system package for PySide2. But this of course assumes PySide2 is in the repo of whatever distro you are running.
I recently made a change to the requirements.sh file to also install PySimpleGUI alongside PySimpleGUIQt so that if Python can't load PySimpleGUIQt it will fallback to PySimpleGUI. Hopefully that will reduce installation complexity for thin clients as well.
I'll try the change and see if it functions better. Not sure if Tkinter will have the same issue or not.
I am getting this error message when I run the vdiclient.py.
Traceback (most recent call last):
File "/home/klo/Downloads/PVE-VDIClient/./vdiclient.py", line 436, in <module>
sys.exit(main())
File "/home/klo/Downloads/PVE-VDIClient/./vdiclient.py", line 420, in main
if not loadconfig(config_location):
File "/home/klo/Downloads/PVE-VDIClient/./vdiclient.py", line 81, in loadconfig
win_popup_button(f'Unable to read supplied configuration from any location!', 'OK')
File "/home/klo/Downloads/PVE-VDIClient/./vdiclient.py", line 148, in win_popup_button
window = sg.Window('Message', layout, return_keyboard_events=True, no_titlebar=True, keep_on_top=True, finalize=True)
File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 9606, in __init__
self.Finalize()
File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 10292, in finalize
self.Read(timeout=1)
File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 10067, in read
results = self._read(timeout=timeout, timeout_key=timeout_key)
File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 10138, in _read
self._Show()
File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 9878, in _Show
StartupTK(self)
File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 16809, in StartupTK
_get_hidden_master_root()
File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 16696, in _get_hidden_master_root
Window.hidden_master_root = tk.Tk()
File "/usr/lib/python3.9/tkinter/__init__.py", line 2270, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
A couple suggestions:
Ensure you're running inside of a graphical environment (X)
If you're running as root (su or sudo) try not doing that, just run as your regular user.
On Thu, Jun 30, 2022, 7:09 AM Karlo Abaga @.***> wrote:
I am getting this error message when I run the vdiclient.py.
Traceback (most recent call last): File "/home/klo/Downloads/PVE-VDIClient/./vdiclient.py", line 436, in
sys.exit(main()) File "/home/klo/Downloads/PVE-VDIClient/./vdiclient.py", line 420, in main if not loadconfig(config_location): File "/home/klo/Downloads/PVE-VDIClient/./vdiclient.py", line 81, in loadconfig win_popup_button(f'Unable to read supplied configuration from any location!', 'OK') File "/home/klo/Downloads/PVE-VDIClient/./vdiclient.py", line 148, in win_popup_button window = sg.Window('Message', layout, return_keyboard_events=True, no_titlebar=True, keep_on_top=True, finalize=True) File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 9606, in init self.Finalize() File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 10292, in finalize self.Read(timeout=1) File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 10067, in read results = self._read(timeout=timeout, timeout_key=timeout_key) File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 10138, in _read self._Show() File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 9878, in _Show StartupTK(self) File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 16809, in StartupTK _get_hidden_master_root() File "/home/klo/.local/lib/python3.9/site-packages/PySimpleGUI/PySimpleGUI.py", line 16696, in _get_hidden_master_root Window.hidden_master_root = tk.Tk() File "/usr/lib/python3.9/tkinter/init.py", line 2270, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable — Reply to this email directly, view it on GitHub https://github.com/joshpatten/PVE-VDIClient/issues/12#issuecomment-1171139329, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIP64QJT6XDFIYOVGDDYNLVRWE6JANCNFSM5T2NHZSQ . You are receiving this because you commented.Message ID: @.***>
@joshpatten Yes, I am running it as a regular user and inside of the default Raspberry Pi OS desktop environment.
my OS info
running requirements.sh
any suggestions ??