edk2-edkrepo icon indicating copy to clipboard operation
edk2-edkrepo copied to clipboard

Installation Error: ModuleNotFoundError: No module named 'pkg_resources' with Windows Python 3.12.x

Open ndhaller opened this issue 1 year ago • 1 comments

Windows OS with python-3.12.0-amd64 or python-3.12.1-amd64 installed, EdkRepoSetup-3.1.3.0.exe Windows installer fails.

Found Python 3.12.1
...
C:\Program Files\Git\etc\profile.d\edkrepo_completions.sh
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\WINDOWS\edkrepo.exe\__main__.py", line 4, in <module>
File "C:\Python312\Lib\site-packages\edkrepo\edkrepo_entry_point.py", line 16, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Installation Error:
System.InvalidOperationException: generate-command-completion-script failed with status 1
at TianoCore.EdkRepoInstaller.InstallWorker.PerformInstall(Action`2 ReportComplete, Action`1 ReportProgress, Action`1 AllowCancel, Func`1 CancelPending)
at TianoCore.EdkRepoInstaller.ProgressWindow.WorkerThread()
Installation Failed.

Windows Python 3.12.x seems removed setuptools . Manually installing setuptools is now a Windows Install Pre-Requisite as well, not just for Linux Build.

py -3 -m pip install setuptools

ndhaller avatar Jan 23 '24 19:01 ndhaller