I have searched for a while and found that the sfml shared objects had to be loaded into the context of the python script
I made a new file "graphics.cpp" with one line in it which is
#include <SFML/Graphics.hpp>
then compile it with this
g++ -fPIC -shared graphics.cpp -lsfml-graphics -lsfml-window -lsfml-system -o graphics.so
the shared object will then automatically have all of the other shared object files that sfml needs
now you import this with cppyy along with you include for graphics.hpp
and the basic python file will look like this
import cppyy
cppyy.include("src/graphics.hpp")
cppyy.load_library('bin/graphics.so')
window = cppyy.gbl.WindowWrapper("Text Window")
window.eventLoop()
it should now execute the event loop code without error