Giang Phạm
New member
How do I make a python executable in Linux?
Answer
Making a Python script executable and runnable from anywhere
Answer
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.