edc / bass

Make Bash utilities usable in Fish shell
MIT License
2.2k stars 70 forks source link

Command 'python' not found #79

Closed Talent30 closed 4 years ago

Talent30 commented 4 years ago

I have python3 installed by default. Bass returns:

~ bass                                                                                         
Command 'python' not found, but can be installed with:

sudo apt install python3         # version 3.7.5-1, or
sudo apt install python          # version 2.7.17-1
sudo apt install python-minimal  # version 2.7.17-1

You also have python3 installed, you can run 'python3' instead.

~/.local/share/omf/pkg/bass/functions/bass.fish (line 10): 
  python (dirname (status -f))/__bass.py $bash_args 3>$script_file
  ^
in function “bass”
    called on standard input
edc commented 4 years ago

If you have python installed already, it is not on your PATH, and your shell cannot find it. You need to update your PATH to add the directory where python binary is. For example, if python is installed to /opt/bin/python, then you need to add this line to your fish config at ~/.config/fish/config.fish:

set -x PATH /opt/bin $PATH
nirvdrum commented 4 years ago

@edc The problem here is there is no binary named python, only python3 (at least in Ubuntu), if Python 3 is the only one installed. Ubuntu says they will not symlink python to python3, citing the advice provided in PEP 394. Without every user explicitly creating symlinks or a shell alias, bass does not work out of the box with Ubuntu 20.04+. Even with Python 2 and 3 installed, there is no python command on the PATH; instead there is python2 and python3.

nirvdrum commented 4 years ago

Investigating this a bit more, the bass.fish properly invokes python3 if available, but __bass.py does not. I'll open a PR.

Talent30 commented 4 years ago

对此进行更多调查,如果有的话,bass.fish适当地调用python3,但__bass.py没有。我要开公关

Thank you very much!

lougreenwood commented 1 year ago

Im still getting this on a new Mac OS install (Ventura 13.1). Is this still a known issue?