Python3编译后缺少sqlite3

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导入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).

我希望获得一些指导,以指导进行故障排除。

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.

您确定要运行:


  1. ./ configure

  2. make

  3. make install

  1. ./configure
  2. make
  3. make install

按此特定顺序?没有缺少的步骤吗?

In this specific order? With no missing steps?