Missing sqlite3 after Python3 compile(Python3 编译后缺少 sqlite3)
问题描述
我的问题很像其他几个问题.手动编译 Python 后,缺少 sqlite3:
My question is much like several others. Having manually compiled Python, sqlite3 is missing:
主要区别在于我使用的是 Debian Linux 系统(与此问题不同:OS X 10.8.2 python 3 import sqlite错误)和Python3(与此问题和其他一系列问题不同:无法使用Python 2.6导入SQLite).
The main difference is that I'm using a Debian Linux system (unlike in this question: OS X 10.8.2 python 3 import sqlite error), and Python3 (unlike in this and a bunch of other questions: Cannot import SQLite with Python 2.6).
我希望能得到一些关于故障排除方向的指导.根据一些 Linux-but-older-Python 问题,我遇到的错误可能是由链接过程中缺少的资源(_sqlite3.so).我的系统上有两个这样的文件,它们都在较旧的 Python 安装中,但与 Python3 无关.还是其中之一足够好?或者他们说要安装 libsqlite3-dev 包,然后重新编译 Python.我这样做了,但我不知道在我的系统上安装这个包会如何影响编译过程.事实上,它没有.第二次编译给了我第二个没有 sqlite3 的 Python.
I was hoping for some guidance on which direction to troubleshoot in. According to some of the Linux-but-older-Python questions, an error like the one I'm getting could be caused by a missing resource during linking or something (_sqlite3.so). I have two such files on my system, both of them in older Python installations, ... but nothing related to Python3. Or is one of these good enough? Or they say to install the libsqlite3-dev package, then to re-compile Python. I did this, but I don't see how just having this package on my system will affect the compilation process. And indeed, it didn't. A second compile gave me a second Python without sqlite3.
我希望我可以只做 apt-get install python3
,但是 Debian 就其稳定性而言,只有 Python 3.2,我需要最新版本.想法?
I wish I could just do apt-get install python3
, but Debian, in its stability, only has Python 3.2, where I need the latest version. Thoughts?
推荐答案
您需要安装 libsqlite3
(基于 Debian)或 sqlite-devel
(基于 RedHat)和在编译 Python 之前关联头文件,因为 Python 需要在编译过程中找到它们.
You need to install libsqlite3
(Debian based) or sqlite-devel
(RedHat based) and the associated header files before compiling Python because Python needs to find them during the compile process.
你确定运行了吗:
./configure
制作
进行安装
按照这个特定的顺序?没有遗漏的步骤?
In this specific order? With no missing steps?
这篇关于Python3 编译后缺少 sqlite3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Python3 编译后缺少 sqlite3
基础教程推荐
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01