python3.4 "ImportError: No module named '_sqlite3'"

python3.4导入sqlite3是报错,如下:

>>> 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

python3.4 "ImportError: No module named '_sqlite3'"

时间: 2024-09-30 11:57:17

python3.4 "ImportError: No module named '_sqlite3'"的相关文章

ImportError: No module named _sqlite3

报错如下: >>> import rpy2.robjects Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/python27/lib/python2.7/site-packages/rpy2-2.8.5-py2.7-linux-x86_64.egg/rpy2/robjects/__init__.py&quo

python3.7 ImportError: No module named _ssl 解决方法

笔者在 centos6.5 安装 python3.7 碰到此问题,安装好以后,执行 python3.7 命令行,import ssl 出现错误 ImportError: No module named _ssl . 该错误表现在 pip install 时会报 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 在网上找了很多资料,经过验

ImportError: No module named _sqlite3 报错解决方法

报错如下错误: >>> import sqlite3 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module> from dbapi2 import * File "/usr

python3.5中import sqlite3报错:ImportError: No module named _sqlite3

原因:缺少相关库 解决方案: 1  安装相关库 yum install sqlite-devel 2  重新编译安装Python

Python 使用中出现错误:ImportError: No module named _sqlite3

解决办法: 1.先安装sqlite3 从sqlite官网:https://www.sqlite.org/download.html 上下载linux环境下的安装包:sqlite-autoconf-3190300.tar.gz 编译安装: 解压并进入sqlite-autoconf-3250200文件夹,执行命令: 安装到/usr/local/sqlite3目录下 # ./configure prefix=/usr/local/sqlite3 开始安装 # make && make insta

from setuptools import setup, find_packages ImportError: No module named set

1 wget http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py 2 ile "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>from dbapi2 import *File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 27, in

关于python3.X 报&quot;import urllib.request ImportError: No module named request&quot;错误,解决办法

#encoding:UTF-8 import urllib.request url = "http://www.baidu.com" data = urllib.request.urlopen(url).read() data = data.decode('UTF-8') print(data) 报错:import urllib.request ImportError: No module named request 解决办法: #encoding:UTF-8 import urlli

python3中用HTMLTestRunner.py报ImportError: No module named &#39;StringIO&#39;如何解决

python3中用HTMLTestRunner.py报ImportError: No module named 'StringIO'的解决方法: 1.原因是官网的是python2语法写的,看官手动把官网的HTMLTestRunner.py改成python3的语法: 参考:http://bbs.chinaunix.net/thread-4154743-1-1.html 下载地址:http://tungwaiyip.info/software/HTMLTestRunner.html 修改后下载地址:

python3中用HTMLTestRunner.py报ImportError: No module named &#39;StringIO&#39;如何解决【转载】

原文转自:http://bbs.chinaunix.net/thread-4154743-1-1.html python3中用HTMLTestRunner.py报ImportError: No module named 'StringIO'的解决方法: 1.原因是官网的是python2语法写的,看官手动把官网的HTMLTestRunner.py改成python3的语法: 参考:http://bbs.chinaunix.net/thread-4154743-1-1.html 下载地址:http:/