Search code examples
pythoneclipsepython-3.6scons

ModuleNotFoundError: No module named 'SCons' when trying to build a project on Eclipse with scons


I am trying to build a project with scons on Eclipse. When I do, the command line outputs the following:

Traceback (most recent call last):
  File "<<<scons-location>>>/scons", line 5, in <module>
    from SCons.Script.Main import main
ModuleNotFoundError: No module named 'SCons'

I noticed that the SCons folder is installed somewhere else in the system, but I just don't know how to tell Eclipse where to find it. I tried putting its location onto the path.

Thanks in Advance!


Solution

  • The answer I found that worked with my specific case had to do with the PYTHONUSERBASE environment variable being modified at the wrong time, and in the wrong way. Fixing that also fixed the issue. Thanks to anyone who helped!