ImportError QtSql in Raspbian - sqlite

QtSql import error occurs in Raspbian.
When I checked PyQt5 import in python console, it was imported.
Only QtSql Import Error occurred.
Anyone know how to fix?
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170124] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtCore import Qt
>>> from PyQt5 import QtSql
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'QtSql'

It was solved by eyllanesc help.
sudo apt-get install python3-pyqt5.qtsql

Related

Problem to open Jupyter notebook: cannot import name 'escape' from 'markupsafe'

Have you guys faced this problem before? I was installing cuCNN and after the installation, I cannot open Jupyter Notebooks anymore.
When I try it I got this error:
(base) PS C:\Users\USER> jupyter notebook
(base) PS C:\Users\USER> jupyter notebook
Traceback (most recent call last):
File "D:\Program Files(D)\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "D:\Program Files(D)\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 43, in <module>
from jinja2 import Environment, FileSystemLoader
File "D:\Program Files(D)\Anaconda3\lib\site-packages\jinja2\__init__.py", line 6, in <module>
from markupsafe import escape
ImportError: cannot import name 'escape' from 'markupsafe' (unknown location)
(base) PS C:\Users\USER>
Does anyone know how to solve it?
I executed these commands to install cuDNN:
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
python3 -m pip install tensorflow
https://www.tensorflow.org/install/pip#windows-wsl2
I solved it hopefully:
"You have to reinstall markupsafe"
After trying several things I had to remove "markupsafe" manually, because "pip uninstall markupsafe" did not work out, once removed it, proceed to install markupsafe again(pip install markupsafe)... and that's it.
Note that for me only worked markupsafe 2.0.1, superior versions had other problems(this problem: https://github.com/aws/aws-sam-cli/issues/3661)
pip install markupsafe==2.0.1

Import Pyodbc error while running a python script on pycharm on mac

I'm getting pyodbc import error while i'm trying to run a python script on pycharm
I have already tried pip install pyodbc , and also brew install unixodbc
I'm still getting the below error.
Traceback (most recent call last):
File "/Users/s0s0qw4/astro-airflow-localdev/dags/dremio.ak.py", line 17, in <module>
import pyodbc
ImportError: dlopen(/Users/s0s0qw4/astro-airflow-localdev/venv/lib/python3.10/site-packages/pyodbc.cpython-310-darwin.so, 0x0002): Library not loaded: '/usr/local/opt/unixodbc/lib/libodbc.2.dylib'
Referenced from: '/Users/s0s0qw4/astro-airflow-localdev/venv/lib/python3.10/site-packages/pyodbc.cpython-310-darwin.so'
Reason: tried: '/usr/local/opt/unixodbc/lib/libodbc.2.dylib' (no such file), '/usr/lib/libodbc.2.dylib' (no such file)
I have tried to uninstall pyodbc and reinstall. I'm getting the below error:
import pyodbc
ImportError: dlopen(/Users/s0s0qw4/astro-airflow-localdev/venv/lib/python3.10/site-packages/pyodbc.cpython-310-darwin.so, 0x0002): Library not loaded: '#rpath/libodbc.2.dylib'
Referenced from: '/Users/s0s0qw4/astro-airflow-localdev/venv/lib/python3.10/site-packages/pyodbc.cpython-310-darwin.so'
Reason: tried: '/usr/lib/libodbc.2.dylib' (no such file)

No module named 'beautifulsoup4' even if the module is downloaded in the anaconda

ModuleNotFoundError Traceback (most recent call last)
<ipython-input-5-f33cf0cb8fd3> in <module>
----> 1 from bs4 import BeautifulSoup
ModuleNotFoundError: No module named 'bs4
beautifulsoup4 is downloaded in my Anaconda Navigator but it shoes that no module is found.
Please help.
import sys
!conda install --yes --prefix {sys.prefix} beautifulsoup4
from bs4 import BeautifulSoup

No module name telethon

from telethon import TelegramClient
Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'telethon'
Installed it using : sudo pip3 install telethon
Switched to python3 on console and ran the above import command.
I have both python 2 and 3.

ubuntu 18.04 python3.6 failed to import PyV8 after build

import PyV8
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/dist-packages/PyV8-1.0.dev0-py3.6-linux-x86_64.egg/PyV8.py", line 33, in
import _PyV8
ImportError: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0: undefined symbol: PyClass_Type

Resources