【已解决】ModuleNotFoundError: No module named ‘DBUtils‘,from DBUtils.PooledDB import PooledDB,

简介: 【已解决】ModuleNotFoundError: No module named ‘DBUtils‘,from DBUtils.PooledDB import PooledDB,

系统环境:

操作系统:Mac M1

Python 版本:3.10

异常

from DBUtils.PooledDB import PooledDB, SharedDBConnection
ModuleNotFoundError: No module named 'DBUtils'


解决方案

方案1

是的,我成功了🏅

解决方法:

1、降低 DBUtils 包版本,使用 pip install DBUtils==1.3 重新安装;

2、更新导入语法为:from dbutils.pooled_db import PooledDB, SharedDBConnection

方案2

待续…

目录
相关文章
|
6月前
|
JavaScript 前端开发
ES6之Module:export、import
ES6之Module:export、import
from pymdownx import superfences No module named ‘pymdownx‘
from pymdownx import superfences No module named ‘pymdownx‘
106 0
|
Docker Python 容器
解决ModuleNotFoundError: No module named ‘distutils.util‘
解决ModuleNotFoundError: No module named ‘distutils.util‘
896 0
ModuleNotFoundError: No module named ‘mmdet.version‘
ModuleNotFoundError: No module named ‘mmdet.version‘
1533 0
No module factory available for dependency type: ModuleHotAcceptDependency
No module factory available for dependency type: ModuleHotAcceptDependency
328 0
|
6月前
|
Linux iOS开发 MacOS
[已解决]ModuleNotFoundError: No module named ‘tqdm‘
[已解决]ModuleNotFoundError: No module named ‘tqdm‘
Py3 ModuleNotFoundError: No module named ‘Crypto‘;ModuleNotFoundError: No module named Cryptodome‘
Py3 ModuleNotFoundError: No module named ‘Crypto‘;ModuleNotFoundError: No module named Cryptodome‘
99 0
ModuleNotFoundError: No module named ‘exceptions‘
ModuleNotFoundError: No module named ‘exceptions‘
【已解决!】ImportError: cannot import name ‘ProjectModelSerializer‘ from partially initialized module ‘pr
【已解决!】ImportError: cannot import name ‘ProjectModelSerializer‘ from partially initialized module ‘pr