I' m new to Raspberry Pi and I created a file with the code:
from tkinter import *
from PIL import Image, ImageTk
import board
import busio
from adafruit_as726x import AS726x_I2C
import time
import RPi.GPIO as GPIO
from picamera import PiCamera
from time import sleep
from picamera.array import PiRGBArray
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import os
camera = PiCamera()
root=Tk()
root.wm_attributes('-fullscreen', 'true')
# setting the windows size
root.geometry("800x480")
PhWait = PhotoImage(file = "/home/pi/AdjustedGraphicsFiles/WaitScreen.png")
FrWait = Frame(root, width=800, height=480,bg="grey",highlightbackground="yellow")
FrWait.pack()
CanvWait = Canvas(FrWait, width=800, height=480)
CanvWait.pack()
CanvWait.create_image(0,0,anchor=NW, image=PhWait)
root.mainloop()
I gave "AllLibraries.py" as a name. It worked fine when I run it from Thonny. I want to run it with double click, so I made executable with the command:
$ pyinstaller AllLibraries.py
and then with the command:
$ pyinstaller --onefile AllLibraries.py
In both cases, the executable file could not run. Is there any answer? How can I run it? I suspect that the problem is in the libraries because when I made it executable removing all imports (exept the 1st one), it worked fine.
Can anyone help? Thanks in advance Nikolas Vardakis