xbar icon indicating copy to clipboard operation
xbar copied to clipboard

No Such File or Directory Error

Open fatihturan opened this issue 2 years ago • 6 comments

Hi,

Whenever I install the plugin on the xBar I get "No Such File or Directory Error" on the menu bar like this: image

I suspect on the Python installation with the Brew but Python is working without any problem and using it.

What could be source of the problem?

fatihturan avatar May 07 '22 10:05 fatihturan

if you run it in a terminal you'll see it cant find /usr/bin/python to actually execute it, this is because python2 was dropped in macos 12.3 it seems, im having same issue https://macmule.com/2022/01/29/macos-monterey-12-3-will-remove-python-2-7-usr-bin-python/

we'll need a way to point xbar to another installation of python to fix this probably, or just make it use python 3 as that would be more sustainable

JacquesBackbase avatar May 11 '22 09:05 JacquesBackbase

if you run it in a terminal you'll see it cant find /usr/bin/python to actually execute it, this is because python2 was dropped in macos 12.3 it seems, im having same issue https://macmule.com/2022/01/29/macos-monterey-12-3-will-remove-python-2-7-usr-bin-python/

we'll need a way to point xbar to another installation of python to fix this probably, or just make it use python 3 as that would be more sustainable

How can we define the Python 3 as default on macOS?

fatihturan avatar May 11 '22 11:05 fatihturan

i dont think we can, didnt see a way to change it in xbar. probably not as easy as just pointing to a new version of python, might be some fundamental changes that need to be made to xbar for that

JacquesBackbase avatar May 11 '22 11:05 JacquesBackbase

FWIW - Using 12.2 with Python 2 still available but Python 3 installed also. Just tried the openweathermap plugin which uses Python 3 and after a couple of tweaks to the code it worked OK. The Python 3 was picked up OK at /usr/bin/python3

1st line of plugin - #!/usr/bin/env PYTHONIOENCODING=UTF-8 /usr/bin/python3

The Binance ticker plugin above worked OK because Python2 was still installed but if using 12.3 the plugin code may need updating for Python3 and /usr/bin/python3 should be OK.

Blatman avatar May 16 '22 18:05 Blatman

Thanks thats useful to know, im no python expert so wasnt sure if you could just do that, will see if i can fix my scripts to work on python 3 now 👍

JacquesBackbase avatar May 17 '22 08:05 JacquesBackbase

same issue

gastonmorixe avatar Jul 07 '22 17:07 gastonmorixe