Replies: 2 comments
-
the issue and its solution worked for me on Amazon Linux 2 for plain Python3.11 - without "pyenv". Looks like a Python3.9+ issue. |
Beta Was this translation helpful? Give feedback.
-
Not all distros configure their compilers (and See https://stackoverflow.com/questions/4980819/what-are-the-gcc-default-include-directories on how to find out GCC's default search directories. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
❯ rtx use python@3.11.5 ❯ python --version Python 3.11.5 ❯ python -c "import sqlite3; print(sqlite3.sqlite_version)" 3.43.1
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