From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 06B68202E53B0 for ; Sun, 17 Feb 2019 23:36:07 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2019 23:36:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,383,1544515200"; d="scan'208";a="139470383" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga001.jf.intel.com with ESMTP; 17 Feb 2019 23:36:05 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Liming Gao , Bob Feng Date: Mon, 18 Feb 2019 15:35:47 +0800 Message-Id: <20190218073547.67408-1-dandan.bi@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 MIME-Version: 1.0 Subject: [patch edk2-wiki] Update ECC wiki page X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2019 07:36:08 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update ECC wiki page to record how to solve the problem “ModuleNotFoundError: No module named 'antlr4'” when run ECC tool with python3.x. Cc: Liming Gao Cc: Bob Feng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi --- ECC-tool.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ECC-tool.md b/ECC-tool.md index eaf4137..03dbb30 100644 --- a/ECC-tool.md +++ b/ECC-tool.md @@ -12,18 +12,27 @@ Steps to run ECC tool:
**1). Enter edk2 directory, run: **edksetup.bat**** (**on Windows**)
**Enter edk2 directory, run: **source edksetup.sh**** (**on Linux**)
**2). Then in edk2 directory, you can type "Ecc" to run ECC tool directly**.
-**3). If you meet following error:**
+**3). If you meet following errors:**
+**Error 1:**
**import antlr3**
**ImportError: No module named antlr3**
-Since ECC depends on antlr V3.0.1, you can download it from http://www.antlr3.org/download/Python/
+This error may be met when you run ECC tool with python 2.x, then ECC depends on antlr V3.0.1, you can download it from http://www.antlr3.org/download/Python/
After download and extract it, you can enter the antlr tool directory and run:
**C:\Python27\python.exe setup.py install** to install it.(**on Windows**)
-**python setup.py install**" to install it, root access may be required.(**on Linux**)
+**python setup.py install** to install it, root access may be required.(**on Linux**)
+ +**Error 2:**
+ **import antlr4 as antlr**
+ **ModuleNotFoundError: No module named 'antlr4'**
+ +This error may be met when you run ECC tool with python 3.x, then ECC depends on antlr4, you can install it through following command.
+**py -3 -m pip install antlr4-python3-runtime** to install it.(**on Windows**)
+**sudo python3 -m pip install antlr4-python3-runtime** to install it. (**on Linux**)
**4). You can type "Ecc -h/Ecc --help" to get the help info of ECC tool**.
**5). Common usage model:**
**Ecc -c config file -e exception file -t the target directory which need to be scanned by ECC -r the ECC scan result csv file**
-- 2.18.0.windows.1