1033 C_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ CPLUS_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ LD_RUN_PATH=/home/felix/.local/sqlite/default/lib ./configure --prefix=/home/felix/.local/python/python-3.9.1 --enable-optimizations 1034 C_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ CPLUS_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ LD_RUN_PATH=/home/felix/.local/sqlite/default/lib make 1035 make clean 1036 C_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ CPLUS_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ LD_RUN_PATH=/home/felix/.local/sqlite/default/lib ./configure --prefix=/home/felix/.local/python/python-3.9.1 --enable-optimizations 1037 C_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ CPLUS_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ LD_RUN_PATH=/home/felix/.local/sqlite/default/lib make 1038 C_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ CPLUS_INCLUDE_PATH=/home/felix/.local/sqlite/default/include/ LD_RUN_PATH=/home/felix/.local/sqlite/default/lib make install 1039 /home/felix/.local/python/python-3.9.1/bin/python3 1040 history [felix@localhost Python-3.9.1]$ /home/felix/.local/python/python-3.9.1/bin/python3 Python 3.9.1 (default, Jan 21 2021, 10:58:50) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> conn = sqlite3.connect(':memory:') >>> conn.create_function('f', 2, lambda *args: None, deterministic=True) >>>
Thanks very ! Every step in compilation should be with the same environment variable. Thanks again! 在 2021年1月21日星期四 UTC+8 上午5:57:43,<Random832> 写道: > On Wed, Jan 20, 2021, at 16:45, Random832 wrote: > > On Wed, Jan 20, 2021, at 14:54, panfei wrote: > > > 3. Compile Python 3.9.1 > > > C_INCLUDE_PATH=/home/felix/.local/sqlite/sqlite-3.34.0/include/ > > > CPLUS_INCLUDE_PATH=/home/felix/.local/sqlite/sqlite-3.34.0/include/ > > > LD_RUN_PATH=/home/felix/.local/sqlite/default/lib ./configure > > > --prefix=/home/felix/.local/python/python-3.9.1 --enable-optimizations > > > make && make install > > > > How *exactly* did you compile python? i.e. what specific commands, to > > make it pick up those include paths? Because from the symptoms you are > > reporting, it sounds like it was not compiled against the correct > > version of sqlite. > Oh, sorry, I missed "./configure" on that line. > > So, it looks like you had the environment variables set when you ran > configure, but not make. I don't think this is a common way to set include > paths, by the way. The usual way is with pkg-config, but I'm not sure how to > add your .local sqlite directory to it. Does your sqlite installation include > a file called "sqlite3.pc"? If so, try adding the directory containing it to > PKG_CONFIG_PATH when running configure. > > If not... well, export the environment variables or add them when running > make and hope for the best -- https://mail.python.org/mailman/listinfo/python-list