pip3安装pysqlite3
一、环境
1.更新 pip3 ,建议更新
python3.8 -m pip install --upgrade pip
2.更新 setuptools
sudo pip3 install --upgrade setuptools
不更新,报错:Preparing metadata (setup.py) ... error
3.报错:No module named '_ctypes'
解决方法:https://www.jianshu.com/p/b1f575c45e10 https://blog.csdn.net/weixin_43790276/article/details/89438959
sudo apt-get install libsqlite3-dev
sudo apt-get install --reinstall zlibc zliblg zliblg-dev
sudo apt-get install libffi-dev libssl-dev
或
yum install libffi-devel
4.报错:src/blob.h:4:10: fatal error: sqlite3.h: 没有那个文件或目录 [注]
sudo apt-get install libsqlite3-dev
注意:安装后还是报同样错误,那可能需要重新编译 python
二、安装 pysqlite3
sudo pip3 install pysqlite3