question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't start Hyper from terminal (/opt/homebrew/bin/hyper: line 4: /usr/bin/python: No such file or directory)

See original GitHub issue
  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: MacOS Monterey 12.3
  • Hyper.app version: 3.2.0
  • Link of a Gist with the contents of your .hyper.js: .hyper.js
  • Relevant information from devtools (CMD+ALT+I on macOS, CTRL+SHIFT+I elsewhere):

Issue

Attempting to invoke Hyper from the terminal (terminal.app or iTerm2) fails:

$ hyper

$ /opt/homebrew/bin/hyper: line 4: /usr/bin/python: No such file or directory
$ /opt/homebrew/bin/hyper: line 8: ./MacOS/Hyper: No such file or directory

Please note my Python installation was done via Homebrew and as I am on an M1 machine all Homebrew installs go under /opt/homebrew/bin.

Also, there’s no such ./MacOS/Hyper anywhere. Was it supposed to get created by Hyper? It’s not there.

Hyper was also installed with Homebrew.

Maybe Related:

I cannot run either Tools/Install Hyper CLI command in PATH, I get the following error:

Screenshot 2022-03-15 at 14 24 35

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:26 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
zcutlipcommented, Mar 17, 2022

This latest version of the patch works perfectly fine, the cli is back and fig works as well (yes, indeed fig is very neat @zcutlip, did you check how nice is to create your own shortcuts or add mixins to expand the current clis?).

No, haven’t played with it yet. Looking forward to it!

Thank you so much. Would this get overwritten on an upcoming version of Hyper?

Yes it’ll get overwritten. I’ll try to submit a PR soon so hopefully they’ll take the fix.

4reactions
zcutlipcommented, Mar 17, 2022

Hmm getting this / or similar error when running the above with or without the set -x part as well

❯ bash ./script.sh
+++++ _realpath ./script.sh
+++++ readlink -f ./script.sh
++++ dirname /Users/<USERNAME_REDACTED>/script.sh
+++ dirname /Users/<USERNAME_REDACTED>
++ dirname /Users
+ CONTENTS=/
+ ELECTRON=//MacOS/Hyper
+ CLI=//Resources/bin/cli.js
+ ELECTRON_RUN_AS_NODE=1
+ //MacOS/Hyper //Resources/bin/cli.js
./script.sh: line 10: //MacOS/Hyper: No such file or directory
+ exit 127

//MacOS/Hyper: No such file or directory seems like a reoccurring error.

This shell script expects to be in its proper home inside the Hyper.app application bundle. That’s what all the CONTENTS=, ELECTRON=, etc are doing…trying to find the path to Hyper.app relative to the hyper script. So you need to patch the script in place: Hyper.app/Contents/Resources/bin/hyper

hyper version was working for me the other day before the latest mac update to macOS Monterey 12.3

That’s because the system’s default python was removed in macOS 12.3. This has been anticipated for a couple years, but the Hyper project must not have known. More info here: https://scriptingosx.com/2020/02/wrangling-pythons/

Read more comments on GitHub >

github_iconTop Results From Across the Web

2 errors appear when I want to use Hyper CLI - Stack Overflow
I get these 2 stupid errors: /opt/homebrew/bin/hyper: line 4: /usr/bin/python: No such file or directory /opt/homebrew/bin/hyper: line 8: .
Read more >
Just downloaded Hyper and can't figure out how to fix ... - Reddit
Trying to get my Hyper setup on my mac and i keep running into this error, and have spent the ... MacOS/Hyper: No...
Read more >
How do I fix "/usr/bin/python: No such file or directory" when ...
For completeness: If I wanted to skip the python code and simple output that the command doesn't exist, I could put this in...
Read more >
Hyper™
The goal of the project is to create a beautiful and extensible experience for command-line interface users, built on open web standards.
Read more >
How to fix: 'python': No such file or directory - My Cyber Universe
In the terminal, type the following commands and press the Enter key to install the python3 package, if it is not already installed....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found