Infinidat / infi.systray

Windows system tray icon
BSD 3-Clause "New" or "Revised" License
216 stars 40 forks source link

ModuleNotFoundError: No module named 'infi.systray' #28

Open gauthierbuttez opened 4 years ago

gauthierbuttez commented 4 years ago

Hi, I tested your demo code in Python 3.7.7 on Windows 10:

from infi.systray import SysTrayIcon
def say_hello(systray):
    print("Hello, World!")
menu_options = (("Say Hello", None, say_hello),)
systray = SysTrayIcon("icon.ico", "Example tray icon", menu_options)
systray.start()

And I get this error message: ModuleNotFoundError: No module named 'infi.systray'

pythonrohan12345 commented 3 years ago

answer of this error is to type "pip install infi.systray" in command prompt because its an different package in infi

WanderingApps commented 2 years ago

When I complied with pyinstaller I had to add --hidden-import pkg_resources --hidden-import infi.systray to my pyinstaller arguments to resolve this error.

Masgame commented 2 years ago

Use "python -m pip install infi.systray" instead of "pip install infi.systray"