How to execute scons in a python3 environment?

Here is a better solution, add this to your .bash_profile:

alias scons3="/usr/bin/env python3 $(which scons)" 

In the latest versions, SCons supports both Python2 and Python3. There is no need to recompile SCons itself or such. All that matters is which Python version is the default on your system.

You don't mention under which OS you're trying to get this working, so I assume a Linux for now. After the installation you can find the scons script in a location like /usr/local/bin/scons (try "which scons" if in doubt). The first line

#! /usr/bin/env python

tells your system to use the default Python version. If this is not what you want, you can simply change it to e.g.

#! /usr/bin/env python3

if you're under a Python2-default system, but want to run SCons with Python3 instead.