Hi Random: Thanks for the suggestion, I will test it right now. there is a file called sqlite3.pc in my installation.
[felix@localhost pkgconfig]$ ll total 4 -rw-r--r-- 1 felix felix 315 Jan 20 12:51 sqlite3.pc [felix@localhost pkgconfig]$ pwd /home/felix/.local/sqlite/default/lib/pkgconfig 在 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