$ pacman -Qo /usr/lib/python3.6
error: No package owns /usr/lib/python3.6
I have removed this directory, /usr/local/lib/python3.6, /usr/local/include/python3.6m and python3* files in /usr/local/bin, then reinstall python.
]]>The lostfiles script will list files that pacman does not know about, which you may want to delete in order to clean up your system.
A more targeted solution, if you still have the python source code which you installed, is to try running make uninstall.
...
Most likely, everything that is relevant there will be in /usr/lib/python3.6
So,
pacman -Qo /usr/lib/python3.6
then remove this directory, clean up any remaining untracked files, and pacman -S python just to make sure that /usr/bin/python etc. are the right versions.
]]>