Spyder not working after installation of other packages - qt

In summary: as far as I recall, after conda-installing fenics and sfepy (along with, through pip, some dependencies), I cannot run spyder:
$ spyder
Traceback (most recent call last):
File "/home/charles/anaconda3/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: No module named 'PyQt5.QtWebEngineWidgets'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/charles/anaconda3/bin/spyder", line 6, in
sys.exit(spyder.app.start.main())
File "/home/charles/anaconda3/lib/python3.5/site-packages/spyder/app/start.py", line 103, in main
from spyder.app import mainwindow
File "/home/charles/anaconda3/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 92, in
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/home/charles/anaconda3/lib/python3.5/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5: version `Qt_5' not found (required by /home/charles/anaconda3/lib/python3.5/site-packages/PyQt5/QtWebKitWidgets.so)
Along the method of
https://www.scivision.co/fix-spyder-cxxabi-not-found-qt-error/
Would it be a terrible idea to simply copy
/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5
to
~/anaconda3/lib/
a la
cp /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 ~/anaconda3/lib/
?
I'm paranoid about breaking something, is there a high probability of that happening?
Surely there's a better way to do this, no?
Thanks!

Related

Pyueye IDS Camera

I am working with IDS camera and they have a python module called pyueye. I installed it using pip, but it seems like the dll are missing:
Traceback (most recent call last):
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/dll.py", line 166, in load_dll
dll = DLL(libinfo, libnames, os.getenv(envname))
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/dll.py", line 96, in __init__
raise RuntimeError("could not find any library for {} ({})".format(libinfo, dllmsg))
RuntimeError: could not find any library for ueye_api (DLL_PATH: unset)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bikram/Documents/uEye/1.py", line 1, in <module>
from pyueye import ueye
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/__init__.py", line 56, in <module>
from . import ueye
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/ueye.py", line 58, in <module>
get_dll_file, _bind = load_dll("ueye_api", ["ueye_api_64", "ueye_api"], "PYUEYE_DLL_PATH")
File "/home/bikram/.local/lib/python3.8/site-packages/pyueye/dll.py", line 168, in load_dll
raise ImportError(exc)
ImportError: could not find any library for ueye_api (DLL_PATH: unset)
I noticed someone else had the same issue in windows.
Does anyone else have the same issue using pyeue?
I had same issue but then I downloaded IDS Software Suite from https://en.ids-imaging.com/
Installed it and everything worked. Give it a try.
It will also let you configure their camera from IDS Camera Manager before you use it from Python.

Apprication launch error: cannot import name 'metadata' from 'importlib'

I have problem with starting my jupyter notebook after uninstalling and updating of sklearn library
as below.
conda uninstall scikit-learn --yes
conda install scikit-learn==0.23.1
I can not start my jupyter notebook from ANACONDA NAGIGATOR by clicking the jupyter notebook launch button.
The Application launch error says,
Traceback (most recent call last):
File "D:\Anaconda3\lib\site-packages\jsonschema\__init__.py", line 31, in
from importlib import metadata
ImportError: cannot import name 'metadata' from 'importlib' (D:\Anaconda3\lib\importlib\__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "D:\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 85, in
from .services.contents.manager import ContentsManager
File "D:\Anaconda3\lib\site-packages\notebook\services\contents\manager.py", line 17, in
from nbformat import sign, validate as validate_nb, ValidationError
File "D:\Anaconda3\lib\site-packages\nbformat\__init__.py", line 32, in
from .validator import validate, ValidationError
File "D:\Anaconda3\lib\site-packages\nbformat\validator.py", line 12, in
from .json_compat import get_current_validator, ValidationError
File "D:\Anaconda3\lib\site-packages\nbformat\json_compat.py", line 10, in
import jsonschema
File "D:\Anaconda3\lib\site-packages\jsonschema\__init__.py", line 33, in
import importlib_metadata as metadata
ModuleNotFoundError: No module named 'importlib_metadata'
Dose anyone know how to solve this problem?

Jupyter will not launch from Anaconda Navigator 32bit

I read where running installing pyqt5 or pip install pyqt5 would correct this error. Did not work for my enviornment. Any suggestions?
Traceback (most recent call last):
File "C:\Users\Paula\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 10, in
import sqlite3
File "C:\Users\Paula\Anaconda3\lib\sqlite3\__init__.py", line 23, in
from sqlite3.dbapi2 import *
File "C:\Users\Paula\Anaconda3\lib\sqlite3\dbapi2.py", line 27, in
from _sqlite3 import *
ImportError: DLL load failed: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Paula\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\Paula\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 86, in
from .services.sessions.sessionmanager import SessionManager
File "C:\Users\Paula\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 13, in
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'

No module named 'MBI' in CADRE plug-in

When I try to run CADRE plug-in it fails when trying to import 'MBI' module in 'CADRE.power' discipline:
Traceback (most recent call last):
File "C:\Users\Laurynas\CADRE\src\mppt.py", line 9, in <module>
from CADRE.power import Power_SolarPower, Power_CellVoltage
File "C:\Users\Laurynas\CADRE\src\CADRE\power.py", line 10, in <module>
from MBI import MBI
ModuleNotFoundError: No module named 'MBI'
Is this some kind of legacy python or OpenMDAO module? I was not able to find it in the web.
Yeah, MBI is a separate package, but you can find it here:
https://github.com/OpenMDAO/MBI

cx_freeze error with pyodbc

if you have a simple program name pyodbcTest.py
import pyodbc
print "pass"
and then use cx_freeze to compile it
cxfreeze --targe-dir=cxTest pyodbcTest.py
and then run that program it throws the following error.
C:\temp\pythonWork\cxTest>pyodbcTest.exe
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec code in m.__dict__
File "pyodbcTest.py", line 1, in <module>
RuntimeError: Unable to import decimal
Any ideas?
I had to add the option --include-module decimal to solve the problem. Not sure why it could not find that one on its own during the freeze process, but its working now

Resources