Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28879

MongoDB failed to build due to ImportError: No module named typing.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Labels:
      None
    • Environment:
      Windows Server 2012 R2 + VS2017 RTM + Python 2.7 + SCons 2.5.1
    • Fully Compatible
    • Windows

      I tried to build MongoDB with master branch latest revision on Windows. It failed to build due to ImportError: No module named typing. This issue can be repro from revision c776e095 (https://github.com/mongodb/mongo/commit/c776e095ac25d0426624f4a84c03f0094c3c661f).

      Python module typing is supported from python 3.5. But SCons does not run under Python version 3.5. Python 3 and above are not yet supported. Could you please take a look at this? Thanks!

      You can repro this issue as the steps below:
      1. git clone -c core.autocrlf=true https://github.com/mongodb/mongo D:\MongoDB\src
      2. Open a VS 2015 x64 command prompt and browse to D:\MongoDB\src
      3. scons all -j4

      Error info:
      C:\tools\Python2\python.exe buildscripts/idl/idlc.py --base_dir build/opt --header build\opt\mongo\idl\unittest_gen.h --output build\opt\mongo\idl\unittest_gen.cpp src\mongo\idl\unittest.idl
      Traceback (most recent call last):
      File "buildscripts/idl/idlc.py", line 23, in <module>
      import idl.compiler
      File "D:\MongoDB\src\buildscripts\idl\idl\compiler.py", line 26, in <module>
      from typing import Any, List
      ImportError: No module named typing
      scons: *** [build\opt\mongo\idl\unittest_gen.cpp] Error 1

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            KarenHuang2017 KarenHuang [X]
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: