question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visual Studion 2019 not supported by Scons

See original GitHub issue

Before submitting an Issue, please review the Issue Guidelines.

  • Please check whether the bug was already reported or fixed.

  • Please check out if the develop version of Nuitka works better for you.

    Download source, packages from here where you will also find instructions how to do it via PyPI.

If you want to post a problem/bug, to help us understand and resolve your issue please check that you have provided at least the information below, and discard up to here:

  • Nuitka version, full Python version and Platform (Windows, OSX, Linux …)

    python -m nuitka --version 0.6.4 Python: 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] OS: Windows Arch: x86_64 wsPython: 4.0

  • How did you install Nuitka and Python (pip, anaconda, deb, rpm, from source, what is a virtualenv …), this is very important usually.

    Nuitka and Python both from Windows installers (msi)

  • Many times when you get an error from Nuitka, your setup may be so special that even a “hello world” program will not work, please try that and report it instead.

  • If possible please supply a Short, Self Contained, Correct, Example that demonstrates the issue i.e a small piece of code which reproduces the issue and can be run with out any other (or as few as possible) external dependencies.

import wx

class MyFrame(wx.Frame):
    def __init__(self):
        super().__init__(self,parent=None, title='Hello World')
        panel = wx.Panel(self)
        self.Show()

if __name__ == '__main__':
    app = wx.App()
    frame = MyFrame()
    app.MainLoop()
  • If this is a regression (used to work in an earlier version of Nuitka), please note what you know about that.

I’m trying to compile the example above into exe using the command py -m nuitka --follow-imports --standalone example.py but I’m getting the following error

IndexError: list index out of range:
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\SingleExe.scons", line 500:
    env = createEnvironment(compiler_tools=compiler_tools)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\SingleExe.scons", line 485:
    **args
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Environment.py", line 982:
    apply_tools(self, tools, toolpath)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Environment.py", line 107:
    env.Tool(tool)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Environment.py", line 1789:
    tool(self)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\__init__.py", line 299:
    self.generate(env, *args, **kw)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\default.py", line 40:
    for t in SCons.Tool.tool_list(env['PLATFORM'], env):
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\__init__.py", line 1271:
    c_compiler = FindTool(c_compilers, env) or c_compilers[0]
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\__init__.py", line 1172:
    if t.exists(env):
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\msvc.py", line 292:
    return msvc_exists(env)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\MSCommon\vc.py", line 759:
    vcs = cached_get_installed_vcs(env)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\MSCommon\vc.py", line 524:
    ret = get_installed_vcs(env)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\MSCommon\vc.py", line 535:
    VC_DIR = find_vc_pdir(ver)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\MSCommon\vc.py", line 344:
    comps = find_vc_pdir_vswhere(msvc_version)
  File "C:\Users\enahm\AppData\Local\Programs\Python\Python37\lib\site-packages\nuitka\build\inline_copy\lib\scons-3.0.4\SCons\Tool\MSCommon\vc.py", line 306:
    vc_pdir = os.path.join(vsdir[0], 'VC')

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Jul 1, 2019

@AhmedMKamal if you wait a moment, I will update to Scons 3.0.5, and maybe it does MSVC 16.

Also, I think VS 2017 is 14.1 or something, they screwed with the numbering.

You can also go with MinGW64, which from my cursory testing gives smaller and faster binaries. See #148 reports.

Yours, Kay

0reactions
kayhayencommented, Jul 27, 2019

Released as 0.6.5 with newer scons that handles this, also VS 2019 is final and works better.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS2019 Support · Issue #3346 · SCons/scons - GitHub
SCons will use VS2019 but will misidentify the version as 14.1. Until VS2019 support is listed in CHANGES.txt it's not a supported version....
Read more >
SCons detects Visual C++ v14.2 (2019) but not v14.1 (2017)
The current version of SCons does not support selecting MSVC v14. 1 (aka "Visual C++ 2017") if Visual Studio 2019 is installed, but...
Read more >
SCons 3.0.5
On Windows systems, scons searches in order for the Microsoft Visual C++ tools, ... This is not supported when SCons is executed with...
Read more >
SCons builds with Visual Studio - The Grbd Blog
SCons builds with Visual Studio. ... of python is that it has a vast library of supporting code. ... SCons does not yet...
Read more >
Compiling for Windows - Godot Docs
SCons will automatically find and use an existing Visual Studio installation. If you do not have Visual Studio installed, it will attempt to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found