Open main menu

Changes

Multiple Python versions

395 bytes added, 18:50, 21 October 2020
m
</source>
This means that the script will look for Python in the PATH environmental variable (in Linux, Mac OS X, and MS Windows) and use that one rather than the Python version it was installed for. This is a fatal problem when multiple Python versions are present as the SCons files are installed as a site-package for the specific Python version, not for the default Python version on the PATH. There are two methods to overcome this difficulty, either by modifying the SCons source file or by pointing to the correct Python and SCons versions.
=== Modifying the sources ===
The first is to edit the first line of this script to point to the correct Python version. For example if the Python you wish to use is installed in the /usr/local/bin/ directory, you could change this script to:<source lang="bash">
<source lang="bash">
#! /usr/local/bin/python
</source>
This will force the correct version. Note that if you are using MS Windows you will need to modify the '''relax.bat''' file instead, adding the full Python path to the '''python''' command in that batch file.
=== Pointing to the correct version ===
alias relax /usr/local/bin/python ~/bin/relax
</source>
 
 
= See also =
 
[[Category:Python]]
Trusted, Bureaucrats
4,228

edits