问题:
引入第三方一个模块(mitmproxy)时,提示报错:No module named '_sqlite3'错误,发现python3编译的时候没有安装sqlite3,sqlite3提供了_sqlite3.so供python3使用连接sqlite库
解决:
先安装sqlite3:
#] wget https://www.sqlite.org/2018/sqlite-autoconf-3240000.tar.gz
#] tar -xf sqlite-autoconf-3240000.tar.gz
#] cd sqlite-autoconf-3240000/
#] ./configure --prefix=/usr/local/sqlite
#] make –j4 && make install
重新编译python3[进入自己的python安装目录]
#] cd /opt/apps/Python-3.6.10/
#] ./configure --enable-loadable-sqlite-extensions
#] make && make install
测试是否解决
#] python3
> import sqlite3
# 没有报错,已成功解决问题
原文链接:https://blog.csdn.net/mx_steve/article/details/108883050
相关文章
- 09-19解决命令行运行python文件,出现No module named *** 报错问题
- 09-19no module named XXX
- 09-19python 2.7 ImportError: No module named numpy
- 09-19python scrapy No module named 'cryptography.hazmat
- 09-19module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘ 报错解决方案
- 09-19No module named pip.req
- 09-19vs2017下发现解决python运行出现‘No module named "XXX""的解决办法
- 09-19Mac--ModuleNotFoundError: No module named 'magic'
- 09-19出现module 'xgboost' has no attribute 'DMatrix'的临时解决方法
- 09-19Error: Cannot find module 'webpack'错误解决