Based on the information from https://github.com/poljar/weechat-matrix#installation
Run the following command to check which version of python weechat is using:
/python version
If you want to [re-]build weechat-git to use python3 (the AUR package instructions use python2 by default), change the following lines in the PKGBUILD when clean-building: