Python3报错ImportError: No module named pysqlite2

简介: Python3报错ImportError: No module named pysqlite2

问题

刚在 CentOS 上装了 Python3.6.5,

运行程序报错

ImportError: No module named pysqlite2

有人回答

import sqlite3

可是第三方包我没法修改呀

解决

安装 sqlite-devel

yum install sqlite-devel -y

重新编译Python,可以指定原来的路径

tar -zxvf  Python-3.6.5.tgz

cd Python-3.6.5
./configure --prefix=/usr/local/python3
make && make install

参考

关于Centos Linux系统安装Python的问题

            </div>
目录
相关文章
|
Python
【Python】已解决:ValueError: Worksheet named ‘Sheet’ not found
【Python】已解决:ValueError: Worksheet named ‘Sheet’ not found
1282 0
|
Linux Python
【Azure Function】Python Function部署到Azure后报错No module named '_cffi_backend'
ERROR: Error: No module named '_cffi_backend', Cannot find module. Please check the requirements.txt file for the missing module.
258 2
|
Python
【Python】已解决ModuleNotFoundError: No module named ‘requests’
【Python】已解决ModuleNotFoundError: No module named ‘requests’
7224 2
|
机器学习/深度学习 IDE TensorFlow
【Python】已解决ModuleNotFoundError: No module named ‘tensorflow‘
【Python】已解决ModuleNotFoundError: No module named ‘tensorflow‘
1586 1
|
自然语言处理 开发者 Python
【Python】已解决:ModuleNotFoundError: No module named ‘nltk‘
【Python】已解决:ModuleNotFoundError: No module named ‘nltk‘
748 1
|
机器学习/深度学习 Python
【Python】已解决:ModuleNotFoundError: No module named ‘paddle’
【Python】已解决:ModuleNotFoundError: No module named ‘paddle’
1747 1
|
自然语言处理 开发者 Python
【Python】已解决:ModuleNotFoundError: No module named ‘nltk’
【Python】已解决:ModuleNotFoundError: No module named ‘nltk’
481 0
【Python】已解决:ModuleNotFoundError: No module named ‘nltk’
|
API 开发工具 Python
【Azure Developer】使用 Azure Python SDK时,遇见 The resource principal named https://management.azure.com was not found in the tenant China Azure问题的解决办法
【Azure Developer】使用 Azure Python SDK时,遇见 The resource principal named https://management.azure.com was not found in the tenant China Azure问题的解决办法
150 0
|
关系型数据库 MySQL Linux
【Azure 应用服务】[App Service For Linux(Function) ] Python ModuleNotFoundError: No module named 'MySQLdb'
【Azure 应用服务】[App Service For Linux(Function) ] Python ModuleNotFoundError: No module named 'MySQLdb'
119 0
|
数据挖掘 程序员 Python
【Python】已解决:ModuleNotFoundError: No module named ‘Workbook’
【Python】已解决:ModuleNotFoundError: No module named ‘Workbook’
353 0