I really need some help with Pyinstaller.
I've created an application to compile our internal projects to --onefile in pyinstaller, helping to avoid pure console commands.
But, I'm facing a strange issue: I'm getting two different results while compiling using a .bat and running the exactly same line on conda prompt.
This is the Pyinstaller result when I run it from the prompt, generating the right result (I'll focus on the spot where's different):
...
27356 INFO: Loading module hook 'hook-xml.py' from 'C:\\Anaconda3\\envs\\python373\\lib\\site-packages\\PyInstaller\\hooks'...
27356 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\Anaconda3\\envs\\python373\\lib\\site-packages\\PyInstaller\\hooks'...
27610 INFO: checking Tree
27626 INFO: Building Tree because Tree-00.toc is non existent
27626 INFO: Building Tree Tree-00.toc
27857 INFO: checking Tree
27857 INFO: Building Tree because Tree-01.toc is non existent
27857 INFO: Building Tree Tree-01.toc
28042 INFO: checking Tree
28042 INFO: Building Tree because Tree-02.toc is non existent
28042 INFO: Building Tree Tree-02.toc
28058 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Anaconda3\\envs\\python373\\lib\\site-packages\\PyInstaller\\hooks'...
28073 INFO: Loading module hook 'hook-lib2to3.py' from 'C:\\Anaconda3\\envs\\python373\\lib\\site-packages\\PyInstaller\\hooks'...
...
And this is the result when running from the .bat, which generates a "Tcl data directory not found" on the final file:
...
28363 INFO: Loading module hook 'hook-xml.py' from 'C:\\Anaconda3\\envs\\python373\\lib\\site-packages\\PyInstaller\\hooks'...
28363 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\\Anaconda3\\envs\\python373\\lib\\site-packages\\PyInstaller\\hooks'...
28632 ERROR: Tk data directory "C:\Users\BRTRAB~1\AppData\Local\Temp\_MEI53402\tk8.6" not found.
28632 INFO: Loading module hook 'hook-distutils.util.py' from 'C:\\Anaconda3\\envs\\python373\\lib\\site-packages\\PyInstaller\\hooks'...
28648 INFO: Loading module hook 'hook-lib2to3.py' from 'C:\\Anaconda3\\envs\\python373\\lib\\site-packages\\PyInstaller\\hooks'...
...
And the line (ambient and everything) is exactly the same for both:
pyinstaller --onefile --windowed --icon=static\icon.ico Project_Main.py
Anyone got any clue about this? I've searched everywhere, tried everything, not even close!
Thanks in advance!