The canonical way to install SCons is from the Python Package Index (PyPi):
% python -m pip install scons
If you prefer not to install to the Python system location, or do not have privileges to do so, you can add a flag to install to a location specific to your own account:
% python -m pip install --user scons
For those users using Anaconda or Miniconda, use the conda installer instead, so the scons install location will match the version of Python that system will be using:
% conda install -c conda-forge scons
SCons comes pre-packaged for installation on many Linux systems. Check your package installation system to see if there is an SCons package available. Many people prefer to install distribution-native packages if available, as they provide a central point for management and updating. During the still-ongoing Python 2 to 3 transition, some distributions may still have two SCons packages available, one which uses Python 2 and one which uses Python 3. Since latest scons only runs on Python 3, to get the current version you should choose the Python 3 package.
If you need a specific
version of SCons that is different from the package available,
pip
has a version option or you can follow
the instructions in the next section.