Git Product home page Git Product logo

Comments (4)

sprak3000 avatar sprak3000 commented on June 2, 2024 2

@TheMin3s

Apple moved to python3 at least an OS X version or two ago. Try editing the script to have this as the first line:

#!/usr/bin/env -S PATH="${PATH}:/opt/homebrew/bin:/usr/local/bin" python3

The above should attempt to find python3 as either the macOS installed version, installed by Homebrew on an Intel based Mac, or installed by Homebrew on an M1 based Mac. If you use asdf or other version management for python installs, add the path for that to the line.

Let me know if this works for you.

from xbar-plugins.

pythoninthegrass avatar pythoninthegrass commented on June 2, 2024

Thanks for posting the solution @sprak3000! My shebang looks like this now due to xbar not finding my asdf python runtime:

#!/usr/bin/env -S PATH="${HOME}/.asdf/shims:/opt/homebrew/bin:/usr/local/bin:${PATH}" python3

Would be better if it was possible to specify the path to the interpreter in the GUI. Took me a while to debug the path via

import os
path = [path for path in os.environ.get('PATH').split(':')]
path = ':'.join(path)
print("PATH")
print("---")
print(path)

from xbar-plugins.

sprak3000 avatar sprak3000 commented on June 2, 2024

Would be better if it was possible to specify the path to the interpreter in the GUI. Took me a while to debug the path via

Probably best to ask that in the main app repo. I'm sure it is possible, but the drawback / difficulty would be in having to write that into each script you enable. What I've thought could be helpful would be to have the GUI detect various things like python, etc. and display them as help / suggestions on how to get a script working if it isn't.

from xbar-plugins.

pythoninthegrass avatar pythoninthegrass commented on June 2, 2024

from xbar-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.