As I am using Python version 3.7.9 for my project. So I finally need to build an exe file so here I have py2exe version 0.12.0.2 which works for the specified python version. When I try to run this command in the terminal py -3.7 setup.py or python setup.py py2exe, it starts py2exe but ends with these module missing error:
>>>python setup.py py2exe
running py2exe
10 missing Modules
------------------
? __builtin__ imported from pyHook.cpyHook
? __main__ imported from bdb, pdb
? _cpyHook imported from pyHook.cpyHook
? _frozen_importlib imported from importlib, importlib.abc
? _frozen_importlib_external imported from importlib, importlib._bootstrap, importlib.abc
? _winreg imported from platform
? java.lang imported from platform
? org.python.core imported from copy, pickle
? os.path imported from os, pkgutil, pyHook.cpyHook, py_compile, sysconfig, tracemalloc, unittest, unittest.util
? readline imported from cmd, code, pdb
And here I attach the list of packages which are already installed for the python version 3.7.9 :
Package Version
------------------ --------
altgraph 0.17.4
cachetools 5.3.2
distlib 0.3.7
filelock 3.12.2
importlib-metadata 6.7.0
pefile 2023.2.7
pip 23.3.1
platformdirs 4.0.0
py2exe 0.12.0.2
pyHook 1.5.1
pyinstaller 5.13.2
pyinstaller-hooks-contrib 2023.10
python-git 2018.2.1
pywin32 306
pywin32-ctypes 0.2.2
Send2Trash 1.8.2
setuptools 47.1.0
tk 0.1.0
typing_extensions 4.7.1
virtualenv 20.25.0
wheel 0.41.2
zipp 3.15.0
Anybody knows how to fix these errors?
First my setup file doesn't even run. When digging upon the terminal, I came to know it was executing by latest python version. So I implicitly run the file with my required python version in the terminal. And next is the rest. Could anyone please tell me how to include these missing modules?