I tried turning my .py file into an exe. Pyinstaller only creates an exe when I'm in a venv, so i used a venv to create the exe. It successfully created the exe, when i dont include --onefile. But it doesn't work, so i thought the fix would be by using --onefile. Anyway, When i use the following command in command prompt (pyinstaller --onefile CustomTG.py) with a virtual environment I get the following error: https://i.stack.imgur.com/cXx2v.png
My python version is (3.8.3).