ModuleNotFoundError: No module named ‘PySide’

Hi.

I start Python course.
Now I have that a problem.
I try find something but still is that same.
Please help, thanks.

I using with fresh updates:
5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

ModuleNotFoundError: No module named ‘PySide’

pip3 install PySide6
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PySide6 in ./.local/lib/python3.10/site-packages (6.4.3)
Requirement already satisfied: shiboken6==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: PySide6-Essentials==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: PySide6-Addons==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)

type or paste copython3 -m pip install “SomeProject”
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement SomeProject (from versions: none)
ERROR: No matching distribution found for SomeProject
python3 -m pip install “SomeProject==1.4”
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement SomeProject==1.4 (from versions: none)
ERROR: No matching distribution found for SomeProject==1.4
python3 -m pip install “SomeProject>=1,<2”
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement SomeProject<2,>=1 (from versions: none)
ERROR: No matching distribution found for SomeProject<2,>=1
python3 -m pip install “SomeProject~=1.4.2”
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement SomeProject~=1.4.2 (from versions: none)
ERROR: No matching distribution found for SomeProject~=1.4.2

pip install PySide6
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PySide6 in ./.local/lib/python3.10/site-packages (6.4.3)
Requirement already satisfied: PySide6-Essentials==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: shiboken6==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: PySide6-Addons==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)

python setup.py install --qtpaths=/path/to/bin/qtpaths6 --parallel=8 --build-tests
Command ‘python’ not found, did you mean:
command ‘python3’ from deb python3
command ‘python’ from deb python-is-python3

Is the module called PySide6 not PySide? Try

import PySide6

Don’t works.
I try.

I think it is the pip show PySide6 that lists the paths to all the files installed.
Also check that the pip command tou ate using is for the python version you are using.
Do you more then one version of python installed or are you using venv?

Try using

py -m pip install PySide6
py -c “import PySide”

Does that work?

py -m pip install PySide6
Command ‘py’ not found, but can be installed with:
sudo apt install pythonpy

sudo apt install pythonpy
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following NEW packages will be installed
pythonpy
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 10.2 kB of archives.
After this operation, 49.2 kB of additional disk space will be used.
Get:1 Index of /ubuntu jammy/universe amd64 pythonpy all 0.4.11b-3ubuntu1 [10.2 kB]
Fetched 10.2 kB in 0s (122 kB/s)
Selecting previously unselected package pythonpy.
(Reading database … 324950 files and directories currently installed.)
Preparing to unpack …/pythonpy_0.4.11b-3ubuntu1_all.deb …
Unpacking pythonpy (0.4.11b-3ubuntu1) …
Setting up pythonpy (0.4.11b-3ubuntu1) …
Processing triggers for man-db (2.10.2-1) …

py -m pip install PySide6
usage: py [-x] [-l] [-c PRE_CMD] [-C POST_CMD] [-V] [-h] [expression]
py: error: unrecognized arguments: -m install PySide6

py -c “import PySide”
Traceback (most recent call last):
File “/usr/bin/py”, line 145, in
exec(args.pre_cmd)
File “”, line 1
“import
^
SyntaxError: invalid character ‘“’ (U+201C)

Apologies i assumed windows…

Use

python -m pip install PySide6
python -c “import PySide”
python -c “import PySide6”

I guess one of the imports should work.

By the way I use PyQt on debian depending on the age of your debian or unbuntu its PyQt5 or PyQt6 that you can use.

Often Linuxes and Unixes want ‘python3 -m pip’, not ‘python -m pip’. On these, ‘python’ is python 2.7. That’ll probably change someday.

I like ‘python3 -m pip list -v’ to show where packages are installed.

Sometimes a package you’ve just installed doesn’t show up, because there are two or more versions of python on the system - one installed into, n-1 not having it.

Here’s an example of using PySide6:

…which may help you test your install.

Not that I want to add any confusion, or muddy the waters, but on my Distro (Linux Mint 19.3 Tricia. base: Ubuntu 18.04 bionic) the OS is using v2.7, while the ‘user’ version is v3.6

To install a package I have to use pip3: pip3 install <package_name> and there’s no need to prefix python or anything else.

The Distro is coming to EOL, so I will need to upgrade very soon, but for now (and the past x number of years), that’s how I have and still do install any needed Python package.

The only exception to the above (that comes to mind) was for Tkinter, for which I needed: sudo apt-get install python3-tk

I trust that my post will be more of a help than a hindrance; my intention being the former.


Quote: the road to hell is paved with good intentions

python -m pip install PySide6
Command ‘python’ not found, did you mean:
command ‘python3’ from deb python3
command ‘python’ from deb python-is-python3

python3 -m pip install PySide6
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PySide6 in ./.local/lib/python3.10/site-packages (6.4.3)
Requirement already satisfied: PySide6-Essentials==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: shiboken6==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: PySide6-Addons==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)

python3 -c “import PySide”
File “”, line 1
“import
^
SyntaxError: invalid character ‘“’ (U+201C)
python3 -c “import PySide6”
File “”, line 1
“import
^
SyntaxError: invalid character ‘“’ (U+201C)

python3 -m pip list -v
Package Version Location Installer


altgraph 0.17.3 /home/piotr/.local/lib/python3.10/site-packages pip
appdirs 1.4.4 /usr/lib/python3/dist-packages
apturl 0.5.2 /usr/lib/python3/dist-packages
arandr 0.1.10 /usr/lib/python3/dist-packages
argcomplete 1.8.1 /usr/lib/python3/dist-packages
asciitree 0.3.3 /usr/lib/python3/dist-packages
attrs 21.2.0 /usr/lib/python3/dist-packages
autobahn 21.11.1 /usr/lib/python3/dist-packages
Automat 20.2.0 /usr/lib/python3/dist-packages
Babel 2.8.0 /usr/lib/python3/dist-packages
backcall 0.2.0 /usr/lib/python3/dist-packages
base58 1.0.3 /usr/lib/python3/dist-packages
bcrypt 3.2.0 /usr/lib/python3/dist-packages
beautifulsoup4 4.10.0 /usr/lib/python3/dist-packages
beniget 0.4.1 /usr/lib/python3/dist-packages
blinker 1.4 /usr/lib/python3/dist-packages
blosc 1.9.2 /usr/lib/python3/dist-packages
Bottleneck 1.3.2 /usr/lib/python3/dist-packages
Brotli 1.0.9 /usr/lib/python3/dist-packages
cbor 1.0.0 /usr/lib/python3/dist-packages
certifi 2020.6.20 /usr/lib/python3/dist-packages
cffi 1.15.0 /usr/lib/python3/dist-packages
cftime 1.5.2 /usr/lib/python3/dist-packages
chardet 4.0.0 /usr/lib/python3/dist-packages
chrome-gnome-shell 0.0.0 /usr/lib/python3/dist-packages
click 8.0.3 /usr/lib/python3/dist-packages
cloudpickle 2.0.0 /usr/lib/python3/dist-packages
colorama 0.4.4 /usr/lib/python3/dist-packages
coloredlogs 7.3 /usr/lib/python3/dist-packages
command-not-found 0.3 /usr/lib/python3/dist-packages
constantly 15.1.0 /usr/lib/python3/dist-packages
cryptography 3.4.8 /usr/lib/python3/dist-packages
cupshelpers 1.0 /usr/lib/python3/dist-packages
cvdupdate 1.0.2 /usr/lib/python3/dist-packages
cycler 0.11.0 /usr/lib/python3/dist-packages
Cython 0.29.28 /usr/lib/python3/dist-packages
dask 2022.1.0+dfsg /usr/lib/python3/dist-packages
dbus-python 1.2.18 /usr/lib/python3/dist-packages
decorator 4.4.2 /usr/lib/python3/dist-packages
defer 1.0.6 /usr/lib/python3/dist-packages
defusedxml 0.7.1 /usr/lib/python3/dist-packages
distributed 2022.1.0+ds.1 /usr/lib/python3/dist-packages
distro 1.7.0 /usr/lib/python3/dist-packages
distro-info 1.1build1 /usr/lib/python3/dist-packages
dnspython 2.1.0 /usr/lib/python3/dist-packages
dropbox 11.26.0 /usr/lib/python3/dist-packages
duplicity 0.8.21 /usr/lib/python3/dist-packages
ecdsa 0.18.0b1 /usr/lib/python3/dist-packages
et-xmlfile 1.0.1 /usr/lib/python3/dist-packages
fastcluster 1.2.3 /usr/lib/python3/dist-packages
fasteners 0.14.1 /usr/lib/python3/dist-packages
Flask 2.0.1 /usr/lib/python3/dist-packages
Flask-API 1.1 /usr/lib/python3/dist-packages
flask-marshmallow 0.14.0 /usr/lib/python3/dist-packages
flaskwebgui 1.0.4 /home/piotr/.local/lib/python3.10/site-packages pip
flatbuffers 1.12.1-git20200711.33e2d80-dfsg1-0.6 /usr/lib/python3/dist-packages
fonttools 4.29.1 /usr/lib/python3/dist-packages
fs 2.4.12 /usr/lib/python3/dist-packages
fsspec 2022.1.0 /usr/lib/python3/dist-packages
fswrap 1.0.1 /usr/lib/python3/dist-packages
fusepy 3.0.1 /usr/lib/python3/dist-packages
future 0.18.2 /usr/lib/python3/dist-packages
gast 0.5.2 /usr/lib/python3/dist-packages
gattlib 0.20201113 /usr/lib/python3/dist-packages
GeoIP 1.3.2 /usr/lib/python3/dist-packages
gnome-keysign 1.2.0 /usr/lib/python3/dist-packages
gpg 1.16.0-unknown /usr/lib/python3/dist-packages
h5netcdf 0.12.0 /usr/lib/python3/dist-packages
h5py 3.6.0 /usr/lib/python3/dist-packages
h5py.-debian-h5py-serial 3.6.0 /usr/lib/python3/dist-packages
HeapDict 1.0.1 /usr/lib/python3/dist-packages
hkdf 0.0.3 /usr/lib/python3/dist-packages
html5lib 1.1 /usr/lib/python3/dist-packages
httplib2 0.20.2 /usr/lib/python3/dist-packages
humanfriendly 10.0 /usr/lib/python3/dist-packages
humanize 0.0.0 /usr/lib/python3/dist-packages
hyperlink 21.0.0 /usr/lib/python3/dist-packages
idna 3.3 /usr/lib/python3/dist-packages
importlib-metadata 4.6.4 /usr/lib/python3/dist-packages
incremental 21.3.0 /usr/lib/python3/dist-packages
indicator-cpufreq 0.2.2 /usr/lib/python3/dist-packages
iniconfig 1.1.1 /usr/lib/python3/dist-packages
ipython 7.31.1 /usr/lib/python3/dist-packages
itsdangerous 2.1.0 /usr/lib/python3/dist-packages
jdcal 1.0 /usr/lib/python3/dist-packages
jedi 0.18.0 /usr/lib/python3/dist-packages
jeepney 0.7.1 /usr/lib/python3/dist-packages flit
jellyfish 0.8.9 /usr/lib/python3/dist-packages
Jinja2 3.0.3 /usr/lib/python3/dist-packages
keyring 23.5.0 /usr/lib/python3/dist-packages
kiwisolver 1.3.2 /usr/lib/python3/dist-packages
language-selector 0.1 /usr/lib/python3/dist-packages
launchpadlib 1.10.16 /usr/lib/python3/dist-packages
lazr.restfulclient 0.14.4 /usr/lib/python3/dist-packages
lazr.uri 1.0.6 /usr/lib/python3/dist-packages
libarchive-c 2.9 /usr/lib/python3/dist-packages
livereload 2.6.3 /usr/lib/python3/dist-packages
llvmlite 0.38.0 /usr/lib/python3/dist-packages
locket 0.2.1 /usr/lib/python3/dist-packages
lockfile 0.12.2 /usr/lib/python3/dist-packages
lxml 4.8.0 /usr/lib/python3/dist-packages
lz4 3.1.3+dfsg /usr/lib/python3/dist-packages
macaroonbakery 1.3.1 /usr/lib/python3/dist-packages
magic-wormhole 0.12.0 /usr/lib/python3/dist-packages
Mako 1.1.3 /usr/lib/python3/dist-packages
Markdown 3.3.6 /usr/lib/python3/dist-packages
MarkupSafe 2.0.1 /usr/lib/python3/dist-packages
marshmallow 3.13.0 /usr/lib/python3/dist-packages
matplotlib 3.5.1 /usr/lib/python3/dist-packages
matplotlib-inline 0.1.3 /usr/lib/python3/dist-packages
mkdocs 1.1.2 /usr/lib/python3/dist-packages
mnemonic 0.19 /usr/lib/python3/dist-packages
mock 4.0.3 /usr/lib/python3/dist-packages
monotonic 1.6 /usr/lib/python3/dist-packages
more-itertools 8.10.0 /usr/lib/python3/dist-packages
mpmath 0.0.0 /usr/lib/python3/dist-packages
msgpack 1.0.3 /usr/lib/python3/dist-packages
mypy-extensions 0.4.3 /usr/lib/python3/dist-packages
netCDF4 1.5.8 /usr/lib/python3/dist-packages
netifaces 0.11.0 /usr/lib/python3/dist-packages
notify2 0.3 /usr/lib/python3/dist-packages
numba 0.55.1 /usr/lib/python3/dist-packages
numcodecs 0.9.1+ds /usr/lib/python3/dist-packages
numexpr 2.8.1 /usr/lib/python3/dist-packages
numpy 1.21.5 /usr/lib/python3/dist-packages
numpy-groupies 0+unknown /usr/lib/python3/dist-packages
numpysane 0.35 /usr/lib/python3/dist-packages
oauthlib 3.2.0 /usr/lib/python3/dist-packages
odfpy 1.4.2 /usr/lib/python3/dist-packages
olefile 0.46 /usr/lib/python3/dist-packages
openpyxl 3.0.9 /usr/lib/python3/dist-packages
openshot-qt 2.5.1 /usr/lib/python3/dist-packages
packaging 21.3 /usr/lib/python3/dist-packages
pandas 1.3.5 /usr/lib/python3/dist-packages
paramiko 2.9.3 /usr/lib/python3/dist-packages
parso 0.8.1 /usr/lib/python3/dist-packages
partd 1.2.0 /usr/lib/python3/dist-packages
passlib 1.7.4 /usr/lib/python3/dist-packages
pbr 5.8.0 /usr/lib/python3/dist-packages
pexpect 4.8.0 /usr/lib/python3/dist-packages
pickleshare 0.7.5 /usr/lib/python3/dist-packages
Pillow 9.0.1 /usr/lib/python3/dist-packages
pip 23.0.1 /home/piotr/.local/lib/python3.10/site-packages pip
pip-check-reqs 2.3.2 /usr/lib/python3/dist-packages
pipx 1.0.0 /usr/lib/python3/dist-packages
pluggy 0.13.0 /usr/lib/python3/dist-packages
ply 3.11 /usr/lib/python3/dist-packages
prettytable 2.5.0 /usr/lib/python3/dist-packages
prompt-toolkit 3.0.28 /usr/lib/python3/dist-packages
protobuf 3.12.4 /usr/lib/python3/dist-packages
proton-client 0.7.1 /usr/lib/python3/dist-packages
protonvpn-cli 3.13.0 /usr/lib/python3/dist-packages
protonvpn-gui 1.12.0 /usr/lib/python3/dist-packages
protonvpn-nm-lib 3.14.0 /usr/lib/python3/dist-packages
psutil 5.9.0 /usr/lib/python3/dist-packages
ptyprocess 0.7.0 /usr/lib/python3/dist-packages flit
py 1.10.0 /usr/lib/python3/dist-packages
py-ubjson 0.16.1 /usr/lib/python3/dist-packages
pyasn1 0.4.8 /usr/lib/python3/dist-packages
pyasn1-modules 0.2.1 /usr/lib/python3/dist-packages
PyBluez 0.23 /usr/lib/python3/dist-packages
pycairo 1.20.1 /usr/lib/python3/dist-packages
pycparser 2.21 /usr/lib/python3/dist-packages
pycups 2.0.1 /usr/lib/python3/dist-packages
pygit2 1.6.1 /usr/lib/python3/dist-packages
Pygments 2.11.2 /usr/lib/python3/dist-packages
PyGObject 3.42.1 /usr/lib/python3/dist-packages
PyHamcrest 2.0.2 /usr/lib/python3/dist-packages
pyinotify 0.9.6 /usr/lib/python3/dist-packages
pyinstaller 5.9.0 /home/piotr/.local/lib/python3.10/site-packages pip
pyinstaller-hooks-contrib 2023.1 /home/piotr/.local/lib/python3.10/site-packages pip
PyJWT 2.3.0 /usr/lib/python3/dist-packages
pymacaroons 0.13.0 /usr/lib/python3/dist-packages
PyNaCl 1.5.0 /usr/lib/python3/dist-packages
PyOpenGL 3.1.5 /usr/lib/python3/dist-packages
pyOpenSSL 21.0.0 /usr/lib/python3/dist-packages
pyparsing 2.4.7 /usr/lib/python3/dist-packages
pypng 0.0.20 /usr/lib/python3/dist-packages
PyQRCode 1.2.1 /usr/lib/python3/dist-packages
PyQt-Qwt 1.2.2 /usr/lib/python3/dist-packages sip-build
PyQt5 5.15.6 /usr/lib/python3/dist-packages sip-build
PyQt5-sip 12.9.1 /usr/lib/python3/dist-packages
PyQt6 6.4.2 /home/piotr/.local/lib/python3.10/site-packages pip
PyQt6-Qt6 6.4.3 /home/piotr/.local/lib/python3.10/site-packages pip
PyQt6-sip 13.4.1 /home/piotr/.local/lib/python3.10/site-packages pip
pyqtgraph 0.12.4 /usr/lib/python3/dist-packages
PyQtWebEngine 5.15.5 /usr/lib/python3/dist-packages sip-build
pyRFC3339 1.1 /usr/lib/python3/dist-packages
PySide2 5.15.2.1 /home/piotr/.local/lib/python3.10/site-packages pip
PySide6 6.4.3 /home/piotr/.local/lib/python3.10/site-packages pip
PySide6-Addons 6.4.3 /home/piotr/.local/lib/python3.10/site-packages pip
PySide6-Essentials 6.4.3 /home/piotr/.local/lib/python3.10/site-packages pip
pytest 6.2.5 /usr/lib/python3/dist-packages
python-apt 2.4.0+ubuntu1 /usr/lib/python3/dist-packages
python-dateutil 2.8.1 /usr/lib/python3/dist-packages
python-debian 0.1.43ubuntu1 /usr/lib/python3/dist-packages
python-gnupg 0.4.8 /usr/lib/python3/dist-packages
python-nubia 0.2b5 /usr/lib/python3/dist-packages
python-qt-binding 0.4.4 /usr/lib/python3/dist-packages
python-snappy 0.5.3 /usr/lib/python3/dist-packages
pythondialog 3.5.1 /usr/lib/python3/dist-packages
pythran 0.10.0 /usr/lib/python3/dist-packages
PyTrie 0.4.0 /usr/lib/python3/dist-packages
pytz 2022.1 /usr/lib/python3/dist-packages
pywebview 3.3.5 /usr/lib/python3/dist-packages
pyxdg 0.27 /usr/lib/python3/dist-packages
PyYAML 5.4.1 /usr/lib/python3/dist-packages
pyzmq 22.3.0 /usr/lib/python3/dist-packages
qrcode 7.3.1 /usr/lib/python3/dist-packages
qt5reactor 0.6.1 /usr/lib/python3/dist-packages
QtAwesome 1.1.1 /usr/lib/python3/dist-packages
qtgui 0.0.1 /home/piotr/.local/lib/python3.10/site-packages pip
QtPy 2.0.0 /usr/lib/python3/dist-packages
qtwidgets 1.1 /home/piotr/.local/lib/python3.10/site-packages pip
rangehttpserver 1.2.0 /usr/lib/python3/dist-packages
reportlab 3.6.8 /usr/lib/python3/dist-packages
requests 2.25.1 /usr/lib/python3/dist-packages
requests-toolbelt 0.9.1 /usr/lib/python3/dist-packages
scipy 1.8.0 /usr/lib/python3/dist-packages
scour 0.38.2 /usr/lib/python3/dist-packages
screen-resolution-extra 0.0.0 /usr/lib/python3/dist-packages
SecretStorage 3.3.1 /usr/lib/python3/dist-packages
service-identity 18.1.0 /usr/lib/python3/dist-packages
setuptools 67.6.0 /home/piotr/.local/lib/python3.10/site-packages pip
shiboken2 5.15.2.1 /home/piotr/.local/lib/python3.10/site-packages pip
shiboken6 6.4.3 /home/piotr/.local/lib/python3.10/site-packages pip
simplejson 3.17.6 /usr/lib/python3/dist-packages
six 1.16.0 /usr/lib/python3/dist-packages
sortedcontainers 2.1.0 /usr/lib/python3/dist-packages
soundconverter 4.0.3 /usr/lib/python3/dist-packages
soupsieve 2.3.1 /usr/lib/python3/dist-packages
spake2 0.8 /usr/lib/python3/dist-packages
stone 3.3.1 /usr/lib/python3/dist-packages
supervisor 4.2.1 /usr/lib/python3/dist-packages
sympy 1.9 /usr/lib/python3/dist-packages
systemd-python 234 /usr/lib/python3/dist-packages
tables 3.7.0 /usr/lib/python3/dist-packages
tblib 1.7.0 /usr/lib/python3/dist-packages
termcolor 1.1.0 /usr/lib/python3/dist-packages
toml 0.10.2 /usr/lib/python3/dist-packages
toolz 0.11.2 /usr/lib/python3/dist-packages
tornado 6.1 /usr/lib/python3/dist-packages
tqdm 4.57.0 /usr/lib/python3/dist-packages
traitlets 5.1.1 /usr/lib/python3/dist-packages
Twisted 22.1.0 /usr/lib/python3/dist-packages
txaio 21.2.1 /usr/lib/python3/dist-packages
txtorcon 20.0.0 /usr/lib/python3/dist-packages
typing-extensions 3.10.0.2 /usr/lib/python3/dist-packages
typing-inspect 0.7.1 /usr/lib/python3/dist-packages
u-msgpack-python 2.3.0 /usr/lib/python3/dist-packages
ubuntu-advantage-tools 8001 /usr/lib/python3/dist-packages
ubuntu-drivers-common 0.0.0 /usr/lib/python3/dist-packages
ufoLib2 0.13.1 /usr/lib/python3/dist-packages
ufw 0.36.1 /usr/lib/python3/dist-packages
ujson 5.1.0 /usr/lib/python3/dist-packages
unattended-upgrades 0.1 /usr/lib/python3/dist-packages
unicodedata2 14.0.0 /usr/lib/python3/dist-packages
urllib3 1.26.5 /usr/lib/python3/dist-packages
usb-creator 0.3.7 /usr/lib/python3/dist-packages
userpath 1.8.0 /usr/lib/python3/dist-packages
vboxapi 1.0 /usr/lib/python3/dist-packages
wadllib 1.3.6 /usr/lib/python3/dist-packages
wcwidth 0.2.5 /usr/lib/python3/dist-packages
webencodings 0.5.1 /usr/lib/python3/dist-packages
Werkzeug 2.0.2 /usr/lib/python3/dist-packages
wheel 0.40.0 /home/piotr/.local/lib/python3.10/site-packages pip
wsaccel 0.6.3 /usr/lib/python3/dist-packages
xarray 0.16.1 /usr/lib/python3/dist-packages
xdg 5 /usr/lib/python3/dist-packages
xkit 0.0.0 /usr/lib/python3/dist-packages
xlrd 1.2.0 /usr/lib/python3/dist-packages
xlwt 1.3.0 /usr/lib/python3/dist-packages
zarr 0.0.0 /usr/lib/python3/dist-packages
zict 2.0.0 /usr/lib/python3/dist-packages
zipp 1.0.0 /usr/lib/python3/dist-packages
zope.interface 5.4.0 /usr/lib/python3/dist-packages

sudo apt-get install python3-tk
[sudo] password for piotr:
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
python3-tk is already the newest version (3.10.6-1~22.04).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

This looks like a “smart quotes” problem. Maybe type the commands instead of copy-pasting them.

In many cases this works:
pip3 install <package>
…but it can lead to confusion about which python you’re installing in.
python3 -m pip install <package>
…has no such ambiguity.

pip3 install PySide
Defaulting to user installation because normal site-packages is not writeable
Collecting PySide
Downloading PySide-1.2.4.tar.gz (9.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.3/9.3 MB 3.1 MB/s eta 0:00:00
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

pip3 install PySide6
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PySide6 in ./.local/lib/python3.10/site-packages (6.4.3)
Requirement already satisfied: shiboken6==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: PySide6-Addons==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: PySide6-Essentials==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)

python3 -m pip install PySide
Defaulting to user installation because normal site-packages is not writeable
Collecting PySide
Using cached PySide-1.2.4.tar.gz (9.3 MB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

python3 -m pip install PySide6
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: PySide6 in ./.local/lib/python3.10/site-packages (6.4.3)
Requirement already satisfied: shiboken6==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: PySide6-Essentials==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)
Requirement already satisfied: PySide6-Addons==6.4.3 in ./.local/lib/python3.10/site-packages (from PySide6) (6.4.3)

Python 3.11.0rc1 (main, Aug 12 2022, 10:02:14) [GCC 11.2.0] on linux
Type “help”, “copyright”, “credits” or “license()” for more information.

======== RESTART: /home/piotr/python/data_base/03_data_base_save_to_file_qt.py ========
Traceback (most recent call last):
File “/usr/lib/python3.11/idlelib/run.py”, line 578, in runcode
exec(code, self.locals)
File “/home/piotr/python/data_base/03_data_base_save_to_file_qt.py”, line 5, in
from PySide6 import QtCore, QtWidgets, QtGui
ModuleNotFoundError: No module named ‘PySide6’

======== RESTART: /home/piotr/python/data_base/03_data_base_save_to_file_qt.py ========
Traceback (most recent call last):
File “/usr/lib/python3.11/idlelib/run.py”, line 578, in runcode
exec(code, self.locals)
File “/home/piotr/python/data_base/03_data_base_save_to_file_qt.py”, line 5, in
from PySide import QtCore, QtWidgets, QtGui
ModuleNotFoundError: No module named ‘PySide’

As Barry has already pointed out: the Module is called PySide6, not PySide and as such from PySide import ... is always going to fail.

Have you tried to simply import PySide6 ?

Sorry if you’ve tried that and posted that it’s not working, but this thread is very laborious to have to read through.

With 6 or not is that same.

Looking at this the import command should be along the lines of:
from PySide6.QtWidgets import QApplication, QWidget

Still is that same.