Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue pyinstaller when running with windows self hosted

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
pyinstaller $env:BITBUCKET_CLONE_DIR\XXXX.sprc -- --app_dir $env:BITBUCKET_CLONE_DIR

However, when running PyInstaller from a different folder (not the one it was installed in),

I receive the following error:

Error: Do not run pyinstaller from C:\Windows\System32\temp\XXXXX\build. 
cd to where your code is and run pyinstaller from there. 

Hint: You can open a terminal where your code is by going to the parent folder in Windows File Explorer and typing cmd into the address bar.

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.

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 3, 2025

Hi Stevedan,

May I know if you are required to run the command from outside the installation folder? Are you cd'ing to a folder that definitely exists within the context of your self-hosted runner build? (hint: adding ls -lah command to your YAML will allow you to to view folders in the build context)

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events