import sys
import os
def main():
PVM = sys.executable
print(PVM)
working_directory = sys.exec_prefix
print(working_directory)
files_in_scripts = os.listdir(path=f"{working_directory}\Scripts")
for file in files_in_scripts:
#print(file)
if file == "pyinstaller.exe":
print(f"{file} вроде как есть...")
return
print("pyinstaller.exe не установлен...")
if __name__ == '__main__':
main()