I am encountering an issue when running PyInstaller via a Bitbucket pipeline on a Windows self-hosted runner. The command I am executing in PowerShell is:
powershell
<span>pyinstaller $env:BITBUCKET_CLONE_DIR\XXXX.sprc -- --app_dir $env:BITBUCKET_CLONE_DIR</span>
However, when running PyInstaller from a different folder (not the one it was installed in),
I receive the following error:
<span><span><span>Error:</span></span> <span><span>Do</span></span> <span><span>not</span></span><span> run pyinstaller </span><span><span>from</span></span><span> C:\Windows\System32\temp\XXXXX\build.
cd </span><span><span>to</span></span> <span><span>where</span></span><span> your code </span><span><span>is</span></span> <span><span>and</span></span><span> run pyinstaller </span><span><span>from</span></span><span> there.
</span><span><span>Hint:</span></span><span> You can open a terminal </span><span><span>where</span></span><span> your code </span><span><span>is</span></span> <span><span>by</span></span><span> going </span><span><span>to</span></span><span> the parent folder </span><span><span>in</span></span><span> Windows File Explorer </span><span><span>and</span></span><span> typing cmd </span><span><span>into</span></span><span> the address bar.</span></span>
Observations
When running the same PyInstaller command manually on the server, it executes without any issues.
The problem occurs only when executing the command via the Bitbucket pipeline.
If I run PyInstaller from the folder where it is installed, the issue does not occur.