Using pyinstaller to creare an executable of the whole package

Hi everyone,

I would lime to creat an executable foir my package. K have installed pyinstaller and lve tried running PyInstaller with - - onedir argument but lm getting a permission denied error. Please help.

You need to provide more information. Do you have a log or directory structure or something like that?

It’s kind of tough to guess without more info.

1 Like

Hi Charles,
thanks, I’m getting the error below:

with open(pathname, 'rb') as fp:

PermissionError: [Errno 13] Permission denied: ‘C:\Users\Athene\Documents\PythonPrograms\Practise\practise’
Info: Process exited with code 1

The commands I ran:

  1. sudo py -m PyInstaller C:\Users\Athene\Documents\PythonPrograms\Practise.
    Then I got the above error and tried,
  2. py -m PyInstaller C:\Users\Athene\Documents\PythonPrograms\bossSpy\bossspy.spec

where could I have gone wrong?

This is likely to be complicated and long winded to fully resolve, so I doubt I can help you on this one, but a quick tip:

  • sudo is a Linux command so you wouldn’t use it on Windows (which I can see you’re using). Taking care to carefully follow the instructions in documentation is crucial.

Also, both your questions on the forum have lacked even basic detail - it’s best to avoid asking for help this way.

People are often willing to help but it’s polite to them if your initial question can show you’ve put at least some thought and effort in making it easier for them to help you.

As a beginner it can be a little hard to know the more involved things to mention but at the very least give people context on what you did - unsurprisingly no one else will magically know this! :grinning:

Thank you so much.

For anyone who would like to create an executable for the whole package. I found this to be very useful tkinter - How to convert a python project into an executable file with all additional scripts? - Stack Overflow
python - How do I specify the default install path of an msi in cx_freeze and distutils? - Stack Overflow

1 Like