Python 官方文档:入门教程 => 点击学习
python3.4导入sqlite3是报错,如下:>>> import sqlite3Traceback (most recent call last): File "<input>", line 1, in
>>> import sqlite3
Traceback (most recent call last):
File "<input>", line 1, in <module>
import sqlite3
File "/usr/local/python3.4/lib/Python3.4/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/python3.4/lib/python3.4/sqlite3/dbapi2.py", line 26, in <module>
from _sqlite3 import *
ImportError: No module named '_sqlite3'
解决:
yum -y install sqlite-devel
重新编译安装python3.4
wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tar.xz
./configure --enable-loadable-sqlite-extensions --prefix=/usr/local/python3.4
make&&make install
--------------------------------
ImportError: No module named 'pyMysql'
python3 -m pip install pymysql
or
pip3 install pymysql
--结束END--
本文标题: python3.4 之sqlite3,
本文链接: https://lsjlt.com/news/191612.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0