You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to install python using the latest version of sqlite. I am doing this because airflow requires a very recent version of SQLite:
airflow.exceptions.AirflowConfigException: error: SQLite C library too old (< 3.15.0). See [https://airflow.apache.org/docs/apache-airflow/2.7.1/howto/set-up-database.html#setting-up-a-sqlite-database](https://airflow.apache.org/docs/apache-airflow/2.7.1/howto/set-up-database.html#setting-up-a-sqlite-database)
I have installed sqlite using the following commands:
wget https://sqlite.org/2023/sqlite-autoconf-3430100.tar.gz
tar -xvf sqlite-autoconf-3430100.tar.gz
cd sqlite-autoconf-3430100
./configure
make clean && make -j 20
sudo make install
Now when I try to install python (using rtx which uses python-build under the hood), I get the following error:
❯ rtx install python 3.11.5
Downloading Python-3.11.5.tar.xz...
-> https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tar.xz
Installing Python-3.11.5...
Traceback (most recent call last):
File "<string>", line 1, in<module>
File "/home/aljohri/.local/share/rtx/installs/python/3.11.5/lib/python3.11/sqlite3/__init__.py", line 57, in<module>
from sqlite3.dbapi2 import *
File "/home/aljohri/.local/share/rtx/installs/python/3.11.5/lib/python3.11/sqlite3/dbapi2.py", line 27, in<module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
Installed Python-3.11.5 to /home/aljohri/.local/share/rtx/installs/python/3.11.5
rtx [email protected] ✓ 58s
In order to get it to work properly, I need to set the following flags and run it again.
I set the CPPFLAGS and LDFLAGS to a pretty standard location, i.e. /usr/local/include and /usr/local/lib. Is there a way this can automatically be detected? I am using Amazon Linux 2 and I installed sqlite using the default location via sudo make install. I got these flags from the python-build source code itself here which seems to get autoset for FreeBSD systems.
I found that setting export LD_RUN_PATH=/usr/local/lib did not work and I needed to manually set CPPFLAGS and LDFLAGS-- any ideas why that might be the case?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to install python using the latest version of sqlite. I am doing this because airflow requires a very recent version of SQLite:
airflow.exceptions.AirflowConfigException: error: SQLite C library too old (< 3.15.0). See [https://airflow.apache.org/docs/apache-airflow/2.7.1/howto/set-up-database.html#setting-up-a-sqlite-database](https://airflow.apache.org/docs/apache-airflow/2.7.1/howto/set-up-database.html#setting-up-a-sqlite-database)
I have installed sqlite using the following commands:
Now when I try to install python (using rtx which uses python-build under the hood), I get the following error:
In order to get it to work properly, I need to set the following flags and run it again.
And now we can see that it installed properly and is using the latest sqlite3.
Multiple questions:
I set the
CPPFLAGS
andLDFLAGS
to a pretty standard location, i.e./usr/local/include
and/usr/local/lib
. Is there a way this can automatically be detected? I am using Amazon Linux 2 and I installed sqlite using the default location viasudo make install
. I got these flags from thepython-build
source code itself here which seems to get autoset for FreeBSD systems.I found that setting
export LD_RUN_PATH=/usr/local/lib
did not work and I needed to manually setCPPFLAGS
andLDFLAGS
-- any ideas why that might be the case?Beta Was this translation helpful? Give feedback.
All reactions