Insertx2k_Dev
Insertx2k_Dev

Reputation: 13

How to fix "ImportError : This platform not supported" when using "pystray" with Pyinstaller?

So after I compiled the program I wrote using pyinstaller in one-file mode, The program doesn't seem to function at all.
When I try to execute it, I receive the following Exception in a Window:

Traceback (most recent call last):
  File "main.py", line 6, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
  File "pystray\__init__.py", line 48, in <module>
  File "pystray\__init__.py", line 44, in backend
ImportError: this platform is not supported: No module named 'pystray._win32'

What could be the issue here? I mean how do I solve this problem?

I'm currently running:
Python 3.9
Windows 10 (the latest version)
Visual Studio Code

Upvotes: 0

Views: 971

Answers (1)

random
random

Reputation: 82

Try using the git bash or command prompt. I don't think PyInstaller works with the VSC terminal.

Upvotes: 0

Related Questions