ssh-ident icon indicating copy to clipboard operation
ssh-ident copied to clipboard

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

Open wolf99 opened this issue 4 years ago • 3 comments

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 avatar Nov 16 '19 15:11 wolf99

The work-around proposed in the following answer works.

But this seems hacky at best.

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

wolf99 avatar Nov 16 '19 20:11 wolf99

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

migs008 avatar Aug 16 '20 22:08 migs008

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

SuperSandro2000 avatar Aug 16 '20 23:08 SuperSandro2000