My program works fine if I run the program.py file in a python environment.
The command used was:-
pyinstaller --noconfirm --onedir -D --add-data "poppler location;./poppler" "program.py"
Then i use pyinstaller to create an executable using onedir option,
When this exe file is run in a different PC(Not having python installed) I get an error. What can I do to set it right? The error is:-
Traceback (most recent call last):
File "Lib\site-packages\pyinstaller-5.0.dev0-py3.9.egg\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py", line 17, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "multiprocessing\__init__.py", line 16, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "multiprocessing\context.py", line 6, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "multiprocessing\reduction.py", line 16, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "socket.py", line 51, in <module>
ModuleNotFoundError: No module named '_socket'
[11744] Failed to execute script pyi_rth_multiprocessing