python3.x - Python3 中导入sqlite3模块报错,显示没有模块?
迷茫
迷茫 2017-04-18 10:25:10
0
2
603

在Centos 7 上安装了 Python3.6,安装后使用sqlite3, 导入sqlite3时报错,显示没有这个模块,请教一下这个一般怎么安装比较方便? sqlite3模块是否要单独安装?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
大家讲道理

It is recommended to recompile and install again
But it is recommended to do the following checks first

  1. There is the sqlite3 tool when checking

  2. It is recommended to recompile python3.6 and do the make test operation (if an error is reported during this period, there must be something wrong)

  3. Check whether the folder path in the sqlite_inc_paths list in line 1130 of the source code setup.py file contains two header files including sqlite3.h and sqlite3ext.h.

I just stepped on this pit before.

左手右手慢动作

sqlite3 comes with it, your file name will not be sqlite3.py吧,因为python导入模块的顺序为sys.path, it will overwrite the default module

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!