Build Error - ModuleNotFoundError with build.py


Satoshi Tanda
 

Hi,

I am unable to complete the "build" command successfully due to the import
error. Can someone point me where to look into?

C:\edk2>build
Traceback (most recent call last):
File "C:\edk2\BaseTools\Source\Python\build\build.py", line 29, in
<module>
from Common.buildoptions import BuildOption,BuildTarget
ModuleNotFoundError: No module named 'Common'

I am trying to follow the build instructions for Windows here, and the
commit I try to work on is edk2-stable201911.
https://github.com/tianocore/tianocore.github.io/wiki/Windows-systems

>git log -1
commit bd85bf54c268204c7a698a96f3ccd96cd77952cd (HEAD ->
edk2-stable201911, tag: edk2-stable201911)

Required software and Conf\target.txt are setup like this.

>set NASM_PREFIX
NASM_PREFIX=C:\Users\tanda\AppData\Local\bin\NASM\

>C:\ASL\iasl.exe -v
...
ASL+ Optimizing Compiler/Disassembler version 20191018

>set PYTHON_HOME
PYTHON_HOME=C:\Python
>python --version
Python 3.8.1

---
ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc
TOOL_CHAIN_TAG = VS2019
---

Then, I run

>edksetup.bat Rebuild
>edksetup.bat
>build

Both edksetup runs end without any errors.

At some point before I was able to build things without the issues. I
suspect some Python setup changes since then caused this but cannot spot
what the cause and how to resolve this.

Appreciate your help.

Best,
Satoshi