I have 2 Python files, one is runner.py and other is IntegrationV10.py and some other Excel files for storing intermediate data. In one folder I have all the above mentioned files.The runner.py file runs a infinite loop and inside the loop it calls IntegrationV10.py file every second.
The code for runner.py is given below:
...
while True:
try:
os.system("python IntegrationV10.py")
time.sleep(1)
except KeyboardInterrupt:
break
I want to bundle runner.py , IntegrationV10.py and all the Excel files to a simple exe file. For this I run the below command:
pyi-makespec runner.py IntegrationV10.py
pyinstaller runner.spec
The exe file is created in dist folder and runs. But it shows error that:
There is no file named IntegrationV10.py
The above message shows every time the runner.exe runs. I could not bundle IntegrationV10.py and excel files in the same exe file. However, when I copy paste IntegrationV10.py and excel files in the dist directory as runner.exe, it starts working. But I want to bundle them all together, not copy paste. Please help me.