Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

"‘python’: No such file or directory" when running Python file as executable

I have installed python and I have a file Wifite.py that exists in my current directory.

But whenever I try to run the Wifite2.py file I receive this error:

‘python’: No such file or directory

jarvus@jarvus:~/wifite2$ ls
bin PMKID.md setup.py wordlist
Dockerfile README.md tests wordlist-
EVILTWIN.md reaver-wps-fork-t6x TODO.md
LICENSE runtests.sh wifite
MANIFEST.in setup.cfg Wifite.py
jarvus@jarvus:~/wifite2$ ./Wifite.py
/usr/bin/env: ‘python’: No such file or directory

What changes should be made to get ./Wifite.py working?

The workaround I got is using:

python3 Wifite.py

But I'm looking for alternatives.

Answer*

Draft saved
Draft discarded
Cancel
2
  • 1
    The shebang can also be /usr/local/bin/python3 (or whatever is the output of which python3) if that is what is available on the system. Commented Jan 28, 2021 at 10:16
  • 1
    Yes it can. Any interpreter you want. Commented Jan 28, 2021 at 10:17

lang-py

AltStyle によって変換されたページ (->オリジナル) /