最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

linux - sqlite3 and python on redhat 7.9 - Stack Overflow

programmeradmin3浏览0评论

I am trying to install python 3.13.2 from sources since I don't have root access on my machine (OS RedHat 7.9). I need the package sqlite3 in order to run jupyter, but it is not installed on the system hence Python disables it.

Here is the command I launch to install:

./configure --prefix my_install_directory --enable-optimizations --disable-test-modules && make -j16

Here is what the configure script says:

checking for sqlite3 >= 3.15.2... no
checking for sqlite3.h... no

And here is what it says at the end of the make command:

The following modules are *disabled* in configure script:
_sqlite3

How can I install sqlite3 on my machine without root privileges and have python find it when I install it ?

I am trying to install python 3.13.2 from sources since I don't have root access on my machine (OS RedHat 7.9). I need the package sqlite3 in order to run jupyter, but it is not installed on the system hence Python disables it.

Here is the command I launch to install:

./configure --prefix my_install_directory --enable-optimizations --disable-test-modules && make -j16

Here is what the configure script says:

checking for sqlite3 >= 3.15.2... no
checking for sqlite3.h... no

And here is what it says at the end of the make command:

The following modules are *disabled* in configure script:
_sqlite3

How can I install sqlite3 on my machine without root privileges and have python find it when I install it ?

Share Improve this question edited Feb 18 at 14:15 PrOpoLo asked Feb 12 at 21:15 PrOpoLoPrOpoLo 1231 silver badge8 bronze badges 8
  • 2 What does "install from source" mean? What is the exact command or procedure? – John Gordon Commented Feb 12 at 21:29
  • 1 The sqlite3 package is part of basic Python. If python cannot find it, then I assume you made some mistake in installing Python. – John Gordon Commented Feb 12 at 21:31
  • 1 The exact procedure is downloading a python tarball and then run ./configure && make install. I don't think there's a mistake on my part, others have had the same issue (see stackoverflow/questions/19530974/…), but my problem is that I don't have root access and I'm not quite satisfied with Shashi Ranjan's answer on the post I linked. – PrOpoLo Commented Feb 12 at 21:55
  • 1 Why are you trying to install from source? Anaconda is just a regular CPython distribution that comes with a bunch of packages, so when you "installed anaconda" then you installed CPython along wiht all those packages. So, again, it's very important to understand, Anaconda is Python. You don't use Python instead of Anaconda. – juanpa.arrivillaga Commented Feb 12 at 21:57
  • 1 @PrOpoLo, not having root access doesn't necessarily mean you should build from source. Other options include using Miniconda, Poetry, uv, ... – Chris Commented Feb 19 at 13:59
 |  Show 3 more comments

1 Answer 1

Reset to default 0

Answering my own question in case it helps someone:

  1. Install the source version of sqlite: https://www.sqlite./2025/sqlite-src-3490000.zip
  2. Add path_to_install_directory/sqlite/lib to LD_LIBRARY_PATH
  3. Add path_to_install_directory/sqlite/bin to PATH
  4. Compile python with CPPFLAGS="-I path_to_install_directory/sqlite/include" ./configure && make -j16 install
发布评论

评论列表(0)

  1. 暂无评论