1

I have the following structure in my project:

ProjectFolder/
              |- Back/
                      |-Estadísticas.py
                      |-FicheroBaraja.py
              |- Front/
                      |-MenuInicial.py
                      |-MesaJuego.py
                      |-Pantalla.py
                      |-PantallaResultados.py
                      |-PantallaError.py
              |-Cartas/
                      |-Baraja.py
                      |-CartaBaraja.py
                      |-Util.py
              |app.py

app.py is the module we have to execute to start the program

This project uses pygame, pandas and matplotlib

I have been told by pyinstaller tutorials that in my case I should execute the following command from project folder:

pyinstaller --onefile --paths=./Back --paths=./Cartas --paths=./Front app.py

It generated my executable file in the folder dist.

If I execute it in that folder, it will return an exception because it can't find the module MenuInicial.py (which is called in app.py) so that is logic.

However, when I move the file app.exe generated to the same folder as app.py (to project folder) and I execute it several weird things happen.

  • First, it takes ages to print the welcome message for pygame
  • Second, it opens my main window but in black completely
  • Third, after several seconds the window is closed without any interaction and it does not return any exception, error or anything.

I am doing all of this in Windows 10x64 bits in Spanish.

I tried to do:

sxstrace trace -logfile:trace.log

And got this error:

Error de StartTrace. Mensaje de error: Access Denied

I should be able to run my application according to the documentation I have read. To sumarize, these are the components I am using: python 3.7.1 pyinstaller 3.5.dev0+d74052489 Windows 10 (well, this is where I am executing this) matplotlib 3.0.3 pandas 0.24.2 The weird thing is, pyinstaller finds pandas, pygame and myplotlib and packages them well apparently

PCharm
  • 11
  • 3

0 Answers0