Visit our NEW Site Visit Now

How to create first python scripts in termux ??

 Hello Termuxian ;)

I Hope you are doing good in your life, if you love python programming language or want to create python script in termux so this post is for you ! i will show you how to create python script from scratch.

first you need to download latest termux application from fdroid market, i know you have already installed but some of using playstore version that gives server error so just download it from fdroid.

lets start...




Here are the steps to create and run your first Python script in Termux:

Open the Termux app on your device.

Make sure you have Python installed. To install Python, type the following command in the Termux terminal and press enter :



1. Install Python
pkg install python -y

Once Python is installed, you can create a new script file using a text editor like nano or vim. For example, to create a new script called "myscript.py" using nano, type the following command :


2. Edit myscript.py in nano editor
nano myscript.py

The text editor will open, and you can now write your Python code. For example, you can write a simple script that prints "Hello World" to the console:


3. Print Hello World !
print("Hello World")

Once you have written your code, save the file by pressing CTRL + X, then Y, then ENTER
To run the script, type the following command in the Termux terminal and press enter :


4. Run Python Script
python myscript.py

The script will run, and the output "Hello World" will be displayed on the terminal.You can also use other text editors such as vim, emacs, etc. Also you can use IDLE (Python's IDE) to write, edit and run your python script. You can install it using apt install python3-idle

Please note that this is just a basic example, and you can use Python to do many more things such as working with data, creating graphical user interfaces, and more.

Thanks for reading..!


google known me as Bhai4You or BullAnonymous.

4 comments

  1. Whats Ur New Telegram Channel
    1. https://telegram.me/flashbomber
    2. Access key
    3. Give me the access key
© Bhai 4 You. All rights reserved. Distributed by Pixabin