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.

Dotbot bin script cannot find python

See original GitHub issue

I get the following output when I run ./install

error: cannot find python
/Volumes/Code/Developer/github/dotfiles/dotbot/bin/dotbot: line 14: return: can only `return' from a function or sourced script
/Volumes/Code/Developer/github/dotfiles/dotbot/bin/dotbot: line 44: unexpected EOF while looking for matching `''
/Volumes/Code/Developer/github/dotfiles/dotbot/bin/dotbot: line 46: syntax error: unexpected end of file

However, I have both python3 and python2 installed.

❯ which python3
/usr/local/bin/python3

❯ which python2
/usr/local/bin/python2

❯ which python
/usr/local/bin/python

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
micarlisecommented, Jun 8, 2018

the dotbot install script is invoked using /usr/bin/env sh. Because bash is being invoked as sh it starts up in backwards compatible mode; therefore won’t source the usual system-wide startup files (and the env program strips out any of your exported variables). My guess is that /usr/local/bin is not in your $PATH var in the sh startup.

A quick test would be to run:

/usr/bin/env sh
echo $PATH

and check if /usr/local/bin is echoed to the terminal.

A more thorough examination would be to look at the contents of /etc/profile and ~/.profile as those are the two startup files in sh mode that get sourced by bash (in that order). On most gnu linux systems /etc/profile sources the contents of the files in /etc/profile.d/*. However, os x is a bit different. And it looks like you use zsh - so I’m also guessing that you don’t have a ~/.profile file.

0reactions
anishathalyecommented, Jun 25, 2018

Hm, this is quite hard to debug without additional information. I think nobody else has been able to reproduce this bug.

I’m going to close this issue for now. Let us know if you have any additional information or a way we might be able to reproduce your bug, and if so, please reopen this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotbot · PyPI
Dotbot is a tool that bootstraps your dotfiles (it's a [Dot]files [bo]o[t]strapper, get it?). It does less than you think, because version control...
Read more >
Github worker does not find python script - Stack Overflow
To access files at the repository root in your github actions workflow, you need to use the actions/checkout action first.
Read more >
great - crates.io: Rust Package Registry
Great(ness) is a tool to manage your dotfiles, and bring every new system you get up to par with the rest!
Read more >
Cross-Platform Dotfiles - Calvin Bui
dotbot. dotbot's config has two main functions: linking files and running scripts. It's possible to split each function for each operating ...
Read more >
what could cause a script to fail to find python when it has ...
But when I run it I get "No such file". I can fix it by changing the first line of the casperjs python...
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