SCons is choosing the older version of the compiler be default.
Doing os.system("g++ -v")
will use your PATH, but SCons internally doesnt use the PATH to find the compiler, it looks in standard locations.
If you cant uninstall the old version of the compiler, you may have to explicitly point out the new compiler. This can be done by setting some Construction Variables on the Environment as follows:
env = Environment()
env.Replace(CXX='path/g++')
env.Replace(CC='path/gcc')
You can find all the construction variables here.