ccontavalli / ssh-ident

Different agents and different keys for different projects, with ssh.
Other
965 stars 71 forks source link

/usr/bin/env: `python`: No such file or directory #57

Open wolf99 opened 4 years ago

wolf99 commented 4 years ago

From the README:

All you need to run ssh-ident is a standard installation of python >= 2.6, python > 3 is supported.

Assuming the comma implies "or" in the above.

I have a standard install of Python 3 in Ubuntu on WSL and is on the PATH (Python 2 is not_installed).

~❯ which python3
/usr/bin/python3

~❯ ~/bin/ssh
/usr/bin/env: ‘python’: No such file or directory

Can I make ssh-ident work as expected without directory shenanigans?

PS: Looks like the following runs... but is a bit more overhead in remembering to do it:

~❯ python3 ~/bin/ssh
Loading keys:
#... etc
wolf99 commented 4 years ago

The work-around proposed in the following answer works.

But this seems hacky at best.

https://askubuntu.com/a/1171171/333103.

migs008 commented 4 years ago

Hi,

I managed to get this working on Ubuntu 20.04 LTS on WSL1. Works like a charm.

sudo apt-get install python-is-python3

I got it from https://stackoverflow.com/questions/41986507/unable-to-set-default-python-version-to-python3-in-ubuntu

SuperSandro2000 commented 4 years ago

Just change the shebang to #!/usr/bin/env python3 instead of wracking entire python 2.