No module named 'PySide' when using Mu - python

I've read all the other questions referencing this issue and tried the solutions but can't seem to get pyperclip working in Mu.
When I try running:
>import pyperclip
>pyperclip.copy('Hello, world')
>pyperclip.paste()
I get the following error:
Traceback (most recent call last):
File "/home/andy/.local/share/mu/mu_venv-38-20210813-134953/lib/python3.8/site-packages/qtpy/__init__.py", line 204, in <module>
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/andy/mu_code/.py", line 3, in <module>
pyperclip.copy('hello')
File "/home/andy/.local/share/mu/mu_venv-38-20210813-134953/lib/python3.8/site-packages/pyperclip/__init__.py", line 658, in lazy_load_stub_copy
copy, paste = determine_clipboard()
File "/home/andy/.local/share/mu/mu_venv-38-20210813-134953/lib/python3.8/site-packages/pyperclip/__init__.py", line 582, in determine_clipboard
import qtpy # check if qtpy is installed
File "/home/andy/.local/share/mu/mu_venv-38-20210813-134953/lib/python3.8/site-packages/qtpy/__init__.py", line 210, in <module>
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

Related

Broken Conda Installation After Conda Update Python

I have tried upgrading Python version on a Miniconda installation by running conda update python. The version was being taken from 3.8 to 3.10. This seems to have broken the installation. No matter what command I run, I get the following:
➜ project conda activate
Traceback (most recent call last):
File "/home/user/miniconda3/lib/python3.10/site-packages/conda/common/serialize.py", line 13, in <module>
import ruamel_yaml as yaml
ModuleNotFoundError: No module named 'ruamel_yaml'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/miniconda3/lib/python3.10/site-packages/conda/common/serialize.py", line 16, in <module>
import ruamel.yaml as yaml
ModuleNotFoundError: No module named 'ruamel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/miniconda3/bin/conda", line 15, in <module>
sys.exit(main())
File "/home/user/miniconda3/lib/python3.10/site-packages/conda/cli/main.py", line 118, in main
from ..exceptions import conda_exception_handler
File "/home/user/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line 24, in <module>
from .models.channel import Channel
File "/home/user/miniconda3/lib/python3.10/site-packages/conda/models/channel.py", line 17, in <module>
from ..base.context import context, Context
File "/home/user/miniconda3/lib/python3.10/site-packages/conda/base/context.py", line 55, in <module>
from ..common.configuration import (Configuration, ConfigurationLoadError, MapParameter,
File "/home/user/miniconda3/lib/python3.10/site-packages/conda/common/configuration.py", line 42, in <module>
from .serialize import yaml_round_trip_load
File "/home/user/miniconda3/lib/python3.10/site-packages/conda/common/serialize.py", line 18, in <module>
raise ImportError("No yaml library available. To proceed, conda install ruamel_yaml")
ImportError: No yaml library available. To proceed, conda install ruamel_yaml
Help on fixing this is appreciated.

Spyder will not launch

For some reason Spyder is not launching when I try to start the application. I tried to then run it through the console, but run into this error:
(base) C:\>spyder
Traceback (most recent call last):
File "C:\Python\Anaconda3\lib\site-packages\qtpy\__init__.py", line 210, in <module>
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "C:\Python\Anaconda3\lib\site-packages\spyder\app\start.py", line 233, in main
from spyder.app import mainwindow
File "C:\Python\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 42, in <module>
requirements.check_qt()
File "C:\Python\Anaconda3\lib\site-packages\spyder\requirements.py", line 44, in check_qt
import qtpy
File "C:\Python\Anaconda3\lib\site-packages\qtpy\__init__.py", line 216, in <module>
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
I've tried running
pip3 install pyqt5
but I get the same error after this installation is completed when I try to launch Spyder through the console. Any advice on this issue?
Can also mention that I tried to download PySide, but couldn't complete the installation as some other errors appeared.

Anaconda: ModuleNotFoundError: No module named 'PySide'

I'm having trouble with Anaconda Navigator. The program isn't lauching anymore, I think it happened after I shutdown my Windows 11 and forced the program to close. When I try to launch it in the Anaconda Prompt, I have the following lines of errors:
(base) C:\Users\user>anaconda-navigator
Traceback (most recent call last):
File "C:\Users\user\anaconda3\lib\site-packages\qtpy\__init__.py", line 209, in <module>
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\anaconda3\Scripts\anaconda-navigator-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\user\anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 119, in main
from anaconda_navigator.app.start import start_app
File "C:\Users\user\anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 19, in <module>
from qtpy import PYQT5
File "C:\Users\user\anaconda3\lib\site-packages\qtpy\__init__.py", line 215, in <module>
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
I've tried solutions in Stackoverflow and already reinstalled the program, but nothing worked yet. If anyone can help, I will appreciate very much!
EDIT: The program returned to normal alone, don't know what happened.

spyder and anaconda navigator loading problem

Traceback (most recent call last):
File "C:\Users\Naveen\anaconda3\lib\site-packages\qtpy\__init__.py", line 204, in <module>
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Naveen\anaconda3\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main()) File "C:\Users\Naveen\AppData\Roaming\Python\Python37\site-packages\spyder\app\start.py", line 200, in main
from spyder.app import mainwindow File "C:\Users\Naveen\AppData\Roaming\Python\Python37\site-packages\spyder\app\mainwindow.py", line 53, in <module>
requirements.check_qt() File "C:\Users\Naveen\AppData\Roaming\Python\Python37\site-packages\spyder\requirements.py", line 41, in check_qt
import qtpy File "C:\Users\Naveen\anaconda3\lib\site-packages\qtpy\__init__.py", line 210, in <module>
raise PythonQtError('No Qt bindings could be found') qtpy.PythonQtError: No Qt bindings could be found
The first error looks like you are missing the pyside module. Can you run
conda install PySide
or
pip install PySide
and see if this fixed that error?

Unable to start the spyder IDE

I have created an environment in Anaconda using environment.yml file. After activating the environment when I try to open Spyder IDE it shows up the following error message.
>(virtual_platform) thepro#thepro-HP-Pavilion-Notebook:~$ spyder
> Traceback (most recent call last):
File "/home/thepro/anaconda3/envs/virtual_platform/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: /home/thepro/anaconda3/envs/virtual_platform/lib/python3.5/site-packages/numexpr/../../../libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/thepro/anaconda3/envs/virtual_platform/bin/spyder", line 6, in <module>
sys.exit(spyder.app.start.main())
File "/home/thepro/anaconda3/envs/virtual_platform/lib/python3.5/site-packages/spyder/app/start.py", line 103, in main
from spyder.app import mainwindow
File "/home/thepro/anaconda3/envs/virtual_platform/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 92, in <module>
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/home/thepro/anaconda3/envs/virtual_platform/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: /home/thepro/anaconda3/envs/virtual_platform/lib/python3.5/site-packages/PyQt5/../../../libQt5WebKit.so.5: symbol _ZN15QQuickFlickable11contentItemEv, version Qt_5_PRIVATE_API not defined in file libQt5Quick.so.5 with link time reference
I am unable to sort it out using all previous suggested solutions on using other gcc versions.
Thanks in advance.

Categories