Если что работа через python(.pyw) работает всё корректно, но после компиляции:
109 INFO: PyInstaller: 4.0
109 INFO: Python: 3.8.5
109 INFO: Platform: Windows-10-10.0.19041-SP0
109 INFO: wrote D:\python\Graphics TURTLE\main.spec
124 INFO: UPX is not available.
124 INFO: Extending PYTHONPATH with paths
['D:\\python\\Graphics TURTLE', 'D:\\python\\Graphics TURTLE']
203 INFO: checking Analysis
203 INFO: Building Analysis because Analysis-00.toc is non existent
203 INFO: Initializing module dependency graph...
203 INFO: Caching module graph hooks...
249 INFO: Analyzing base_library.zip ...
10030 INFO: Processing pre-find module path hook distutils from 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
10046 INFO: distutils: retargeting to non-venv dir 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib'
22155 INFO: Caching module dependency graph...
22389 INFO: running Analysis Analysis-00.toc
22405 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\adm\appdata\local\programs\python\python38-32\python.exe
22655 INFO: Analyzing D:\python\Graphics TURTLE\main.pyw
22936 INFO: Processing module hooks...
22936 INFO: Loading module hook 'hook-distutils.py' from 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
22936 INFO: Loading module hook 'hook-encodings.py' from 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
23092 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
23389 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
23389 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
23389 INFO: Loading module hook 'hook-xml.py' from 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
23671 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks'...
24108 INFO: checking Tree
24108 INFO: Building Tree because Tree-00.toc is non existent
24108 INFO: Building Tree Tree-00.toc
24264 INFO: checking Tree
24264 INFO: Building Tree because Tree-01.toc is non existent
24264 INFO: Building Tree Tree-01.toc
24374 INFO: Looking for ctypes DLLs
24421 INFO: Analyzing run-time hooks ...
24436 INFO: Including run-time hook 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
24436 INFO: Including run-time hook 'c:\\users\\adm\\appdata\\local\\programs\\python\\python38-32\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth__tkinter.py'
24452 INFO: Looking for dynamic libraries
25499 INFO: Looking for eggs
25499 INFO: Using Python library c:\users\adm\appdata\local\programs\python\python38-32\python38.dll
25499 INFO: Found binding redirects:
[]
25514 INFO: Warnings written to D:\python\Graphics TURTLE\build\main\warn-main.txt
25639 INFO: Graph cross-reference written to D:\python\Graphics TURTLE\build\main\xref-main.html
25749 INFO: checking PYZ
25749 INFO: Building PYZ because PYZ-00.toc is non existent
25749 INFO: Building PYZ (ZlibArchive) D:\python\Graphics TURTLE\build\main\PYZ-00.pyz
26874 INFO: Building PYZ (ZlibArchive) D:\python\Graphics TURTLE\build\main\PYZ-00.pyz completed successfully.
26920 INFO: checking PKG
26920 INFO: Building PKG because PKG-00.toc is non existent
26920 INFO: Building PKG (CArchive) PKG-00.pkg
26999 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
27014 INFO: Bootloader c:\users\adm\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\bootloader\Windows-32bit\runw.exe
27014 INFO: checking EXE
27014 INFO: Building EXE because EXE-00.toc is non existent
27014 INFO: Building EXE from EXE-00.toc
27124 INFO: Copying icons from ['D:\\python\\Graphics TURTLE\\icon.ico']
27217 INFO: Writing RT_GROUP_ICON 0 resource with 20 bytes
27217 INFO: Writing RT_ICON 1 resource with 4617 bytes
27233 INFO: Appending archive to EXE D:\python\Graphics TURTLE\build\main\main.exe
27499 INFO: Building EXE from EXE-00.toc completed successfully.
27514 INFO: checking COLLECT
27514 INFO: Building COLLECT because COLLECT-00.toc is non existent
27514 INFO: Building COLLECT COLLECT-00.toc
48529 INFO: Building COLLECT COLLECT-00.toc completed successfully.
Произошла ошибка продемонстрирована в заголовке, pyinstaller переустанавливал, и что интересно, после самостоятельной работой над ошибкой, я заметил, что Windows defender начал говорить: "Trojan:Win32/Wacatac.D!ml", где писало, что это взаемодействует с .exe, вот код программы (python 3.8.5(нашел в папке (appdata\programs)):
from tkinter import *
root = Tk()
root.title("settings")
root.geometry('150x50')
root.iconbitmap('icon.ico')
def minusgraph():
import minusgraphturtle
def plusgraph():
import plusgraphturtle
def button(text, command, place_y):
btn = Button(root,
text=text,
bg="#000000",
fg="#00ff00",
height=1,
width=20,
command=command)
btn.place(x=0, y=place_y)
button("Graph with minus", minusgraph, 0)
button("Graph with plus", plusgraph, 25)
root.mainloop()
Если нужно будет, то скину на другой код.