Python Error During AscendFaiss Compilation and Installation

Symptom

The following error information is displayed during the compilation and installation of AscendFaiss.

Possible Cause

During the compilation and installation of Python from source code, --enable-shared is not configured.

--enable-shared retains the previously generated shared library.

Solution

Recompile and install Python as follows:
./configure --prefix=/usr/local/python3.11.11 --enable-shared