I have the same problem. Since Anaconda managed my Python environment, I generated a requirement.txt file using pip, and created a virtual environment as indicated by PzKpfwlVB including auto_py_to_exe. As a result, I was able to generate the executable file including pyside6.