sqlite3 version mismatch on different installation methods

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sqlite3 version mismatch on different installation methods

yanivbm
Hello,

I am using python 3.8 on Pycharm.
Once installing owlready2==0.35 through pip command, the sqlite version installed is 3.36.0 (by running sqlite3.sqlite_version), and everything seems to work properly.

However, once installing owlready2==0.35 through the dockerfile below, the sqlite version installed is 3.7.17, which causes errors on running sqlite RECURSIVE commands, making the package unusable for me.

What could be causing such difference, and what actions are recommended to address this issue?

Thank you!

Dockerfile:

FROM public.ecr.aws/lambda/python:3.8
WORKDIR /work
COPY . .
COPY requirements.txt requirements_input_mapper.txt
RUN pip3 install -r requirements.txt
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3 version mismatch on different installation methods

Jiba
Administrator
Hi,

I think you need to upgrade Sqlite3 -- version 3.7.17 is more than 8 years old.

Under Linux, Sqlite3 is usually dynamically linked, so you can upgrade it without having to upgrade Python. Since Sqlite3 has no dependency, manually compiling it is relatively easy.

jiba
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3 version mismatch on different installation methods

yanivbm
Hi Jiba,

Thanks for your reply.

I did not mention this previously - I use mac but building the docker image on linux/amd64 platform.

Regarding the issue - Sqlite3 is being installed through owlready2 installation process. Prior to calling owlready2 installation command, sqlite3 is not installed at all in my system, and i use a clean virtual environment.

issue is that installing owlready2 using the two methods i mentioned above provides two different sqlite versions.
More specifically, the issue is that installing owlready2 through the dockerfile i stated above, provides an sqlite version is 3.7.17, which is unusable.

As sqlite3 installation is invoked by owlready2 setup, my question is how can I alter this.

Thanks,
Yaniv
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3 version mismatch on different installation methods

Jiba
Administrator
Hi,

This is very surprising to me, because SQLite3 is normally included with Python. The "sqlite3" module is part of the standard distribution. Actually, there is nothing in Owlready setup that require SQLite3, since it is supposed to be available with Python.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: sqlite3 version mismatch on different installation methods

yanivbm
Hi,

You are absolutely right. So i guess that the docker image I use (AWS Python 3.8 base image) includes an installation of an old sqlite version, and I need to find out how to upgrade the version within the image.

Thank you,
Yaniv