I reinstalled pyinstaller because it wasn't able to build executable files. Now it makes them (using python c:\users\asus\appdata\roaming\python\python310\scripts\pyinstaller.exe --onefile -w file.py) but when executed both normally and with administrator privileges it kept giving me this error:
Traceback (most recent call last):
File "PyInstaller\hooks\rthooks\pyi_rth_win32api.py", line 18, in <module>
File "PyInstaller\loader\pyimod02_importers.py", line 493, in exec_module
File "pywintypes.py", line 117, in <module>
File "pywintypes.py", line 44, in __import_pywin32_system_module__
ImportError: Module 'pywintypes' isn't in frozen sys.path ['C:\\Users\\Asus\\AppData\\Local\\Temp\\_MEI80602\\base_library.zip', 'C:\\Users\\Asus\\AppData\\Local\\Temp\\_MEI80602\\lib-dynload', 'C:\\Users\\Asus\\AppData\\Local\\Temp\\_MEI80602']