How do we make Python Scripts Executable ?
Answers
Answered by
2
Making a Python script executable and runnable from anywhere
Add this line as the first line in the script: #!/usr/bin/env python3.
At the unix command prompt, type the following to make myscript.py executable: $ chmod +x myscript.py.
Move myscript.py into your bin directory, and it will be runnable from anywhere.
Similar questions