Again I have not done this but my understanding is
- I agree that both Python and SWI-Prolog both need to be at same bit-ness for this to work, either both 64-bit or both 32-bit.
- You should be on newer versions of the software. Python 2.x is no longer supported and SWI-Prolog 7.x is so old that everyone will tell you to upgrade to 8.3.x.
- You will have to build SWI-Prolog for use with Raspberry Pi. There are no ready to download builds of SWI-Prolog for Raspberry Pi. That is because Raspberry Pi uses ARM processors and there is not a great demand for this variation of SWI-Prolog it is not a standard part of the build and distribute process.
You might also consider creating a Docker image for building this variation. As an example there is GitHub - SWI-Prolog/docker-swipl-build-mingw: Docker to cross-compile SWI-Prolog for Windows. Just modify it for building the Raspberry Pi version.
Also there is the Prolog Language Server which might satisfy your needs and is so new you could be the first to try it with Raspberry Pi.
Prolog Language Server: Enabling swipl integration with Python and other languages