On Monday, 6 July 2020 15:04:39 UTC+2, bwoodsend wrote: > > *The short answer: * > Use PyInstaller --onefile --runtime-tempdir . myscript.py to have the > _MEI folder placed . > > *The long answer:* > You can override where the _MEI folder goes with the --runtime-tmpdir. > Quoting the docs: > > —runtime-tmpdir PATH > Where to extract libraries and support files in onefile-mode. If this > option is given, the bootloader will ignore any temp-folder location > defined by the run-time OS. The _MEIxxxxxx- will be created here. Please > use this option only if you know what you are doing. > > The issue with this is that you have to know at build time the path to a > safe run-time location. And as *safe* usually would imply a user > directory and a user directory would likely contain their username and > therefore depend on the machine running it this is effectively impossible. > Normally you get around this by reading environment variables such as > %HOME% but we don’t have that kind of control over the bootloader. The > fix for this is to use a path relative to the application (which we’ll > assume is in a folder the user has permission for). > I will try --runtime-tmpdir option, anyway I don't think this will solve my problem. I has been able to change the temporary directory without changing original pyinstaller script and command line. I don't remember exactly, but I'm quite sure I changed TEMP or TMP environment variable. So I already tried to point to a directory the user can read, write and execute. The problem is really with _MEI folder. It seems the pyinstaller bootloader make this directory with strange permissions, such that the user itself isn't able to enter, read and delete!
Even with Exporer or command line (DEL), I can't delete the _MEI folder created by pyinstaller. So I don't think the problem is with the temporary directory (the parent of _MEI), the problem is WITH _MEI directory. > > -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/52822c7a-0edf-4788-87f6-d16cc97d5db5o%40googlegroups.com.