jaredks / rumps

Ridiculously Uncomplicated macOS Python Statusbar apps
BSD 3-Clause "New" or "Revised" License
3.06k stars 177 forks source link

Cannot get basic app working on OSX #210

Closed turian closed 5 months ago

turian commented 5 months ago

Related to #199

I have a MacBook Air M2, OSX 14.1.2, using pypi rumps Oct 15, 2022, trying with Python 3.9 and 3.10.

I try the example code from the README and the program just executes with no messages (in 3.9) and no system tray icon.

I try using venv as per the README and it also doesn't work, but with 3.10 I do get:

2024-01-16 02:21:45.389 Python[16544:39682695] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/js/z6jnm8ys1kb6yxqvwkd4v94r0000gn/T/org.python.python.savedState

I try packaging with py2app as per #199 but I get the a window: "LaunchError". When I set 'argv_emulation': False, as per #208, I get a "Allow Python notifications" dropdown in the upper right, but no tray icon.

Any advice?

joseph@Josephs-MacBook-Air /tmp> python3.10 -m venv env                                                                              (base) 
joseph@Josephs-MacBook-Air /tmp> source env/bin/activate.fish                                                                        (base) 
(env) joseph@Josephs-MacBook-Air /tmp> pip3 install rumps py2app                                                                     (base) 
Collecting rumps
  Using cached rumps-0.4.0.tar.gz (39 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting py2app
  Using cached py2app-0.28.6-py2.py3-none-any.whl.metadata (63 kB)
Collecting pyobjc-framework-Cocoa (from rumps)
  Using cached pyobjc_framework_Cocoa-10.1-cp310-cp310-macosx_10_9_universal2.whl.metadata (2.3 kB)
Collecting altgraph>=0.17.3 (from py2app)
  Using cached altgraph-0.17.4-py2.py3-none-any.whl.metadata (7.3 kB)
Collecting modulegraph>=0.19.5 (from py2app)
  Using cached modulegraph-0.19.6-py2.py3-none-any.whl.metadata (14 kB)
Collecting macholib>=1.16.2 (from py2app)
  Using cached macholib-1.16.3-py2.py3-none-any.whl.metadata (11 kB)
Requirement already satisfied: setuptools in ./env/lib/python3.10/site-packages (from modulegraph>=0.19.5->py2app) (68.2.2)
Collecting pyobjc-core>=10.1 (from pyobjc-framework-Cocoa->rumps)
  Using cached pyobjc_core-10.1-cp310-cp310-macosx_10_9_universal2.whl.metadata (2.5 kB)
Using cached py2app-0.28.6-py2.py3-none-any.whl (835 kB)
Using cached altgraph-0.17.4-py2.py3-none-any.whl (21 kB)
Using cached macholib-1.16.3-py2.py3-none-any.whl (38 kB)
Using cached modulegraph-0.19.6-py2.py3-none-any.whl (34 kB)
Using cached pyobjc_framework_Cocoa-10.1-cp310-cp310-macosx_10_9_universal2.whl (392 kB)
Using cached pyobjc_core-10.1-cp310-cp310-macosx_10_9_universal2.whl (752 kB)
Building wheels for collected packages: rumps
  Building wheel for rumps (pyproject.toml) ... done
  Created wheel for rumps: filename=rumps-0.4.0-py3-none-any.whl size=31852 sha256=e2fd644c25c6896231cbe5169320bf60bbd00ff7e4ff52a1bdc97ec108643a43
  Stored in directory: /Users/joseph/Library/Caches/pip/wheels/8f/42/86/ad44661bf2fe53bee9b5b1258c5d94e1f622412d59bc2bae9d
Successfully built rumps
Installing collected packages: altgraph, pyobjc-core, modulegraph, macholib, pyobjc-framework-Cocoa, py2app, rumps
Successfully installed altgraph-0.17.4 macholib-1.16.3 modulegraph-0.19.6 py2app-0.28.6 pyobjc-core-10.1 pyobjc-framework-Cocoa-10.1 rumps-0.4.0

[notice] A new release of pip is available: 23.3.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip
(env) joseph@Josephs-MacBook-Air /tmp> vi example_class.py                                                                           (base) 
(env) joseph@Josephs-MacBook-Air /tmp> python3 example_class.py                                                                      (base) 
2024-01-16 02:21:45.389 Python[16544:39682695] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/js/z6jnm8ys1kb6yxqvwkd4v94r0000gn/T/org.python.python.savedState
^C⏎                                                                                                                                         (env) joseph@Josephs-MacBook-Air /tmp> vi setup.py                                                                                   (base) 
(env) joseph@Josephs-MacBook-Air /tmp> python setup.py py2app                                                                        (base) 
/private/tmp/env/lib/python3.10/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
WARNING: The wheel package is not available.
running py2app
...
/private/tmp/dist/example_class.app/Contents/Frameworks/libtk8.6.dylib: replacing existing signature
/private/tmp/dist/example_class.app/Contents/Frameworks/libtk8.6.dylib: signed Mach-O thin (arm64) [com.tcltk.tklibrary]
/private/tmp/dist/example_class.app/Contents/Frameworks/Python.framework/Versions/3.10/Python: replacing existing signature
/private/tmp/dist/example_class.app/Contents/Frameworks/Python.framework/Versions/3.10/Python: signed bundle with Mach-O thin (arm64) [org.python.python]
/private/tmp/dist/example_class.app: replacing existing signature
/private/tmp/dist/example_class.app: signed app bundle with Mach-O thin (arm64) [org.pythonmac.unspecified.example_class]
checking for any import problems
Modules not found (unconditional imports):
 * _abcoll (rumps.packages.ordereddict)
 * _overlapped (asyncio.windows_events)
 * dummy_thread (rumps.packages.ordereddict)
 * platformdirs (pkg_resources._vendor.platformdirs.__main__)
 * thread (rumps.packages.ordereddict)

Modules not found (conditional imports):
 * _manylinux (pkg_resources._vendor.packaging._manylinux)
 * jnius (pkg_resources._vendor.platformdirs.android)
 * pep517 (importlib.metadata)
 * typing_extensions (pkg_resources._vendor.packaging.metadata)

Done!
turian commented 5 months ago

This was user error on my part, the system tray was too crowded to see the app.

parksunghyun-78 commented 4 months ago

This was user error on my part, the system tray was too crowded to see the app.

*my pc system used :MacBook Pro M2, 13.4.1(22F82)

The error message is as follows. checking for any import problems

Can you share your solution?

////////////////////////////////////////////////////////////////////////under Modules not found (unconditional imports):

Modules not found (conditional imports):

Done! //////////////////////////////////////////////////////////////////////