How to run the file in putty

I have searched on the internet and also I have seen the tutorial but I haven’t found how to run the file .

@surendra

Have you SSH’ed to your Virtual Machine?

yah I have SSH’ed to my virtual machine

@surendra

Incase you wish to run a python file, you need to use python filename.py.

Before that make sure the directory you are in has the file in it. And also, whether you have python installed on it.

You can elaborate on the issue by sending a screenshot of the error or issue you are facing.

To run a Python file in Putty, follow these steps:

  1. Open Putty and log in to the remote server where your Python file is located.
  2. Navigate to the directory where your Python file is located using the “cd” command. For example, if your Python file is located in the directory “/home/user/scripts/”, you can navigate to it by typing:

cd /home/user/scripts/

  1. Once you’re in the correct directory, you can run your Python file using the “python” command followed by the name of the file. For example, if your Python file is named “my_script.py”, you can run it by typing:

python my_script.py

  1. If your Python file requires any command line arguments, you can include them after the file name. For example, if your script expects an input file name as an argument, you can run it like this:

python my_script.py input_file.txt

  1. Once you’ve run your Python script, you should see the output in the Putty terminal.

Also make sure if python is installed in your remote server

to run python file, use python filename.py

To run a file in PuTTY, you’ll need to follow these steps:

  1. Open a PuTTY session and connect to your remote server.
  2. Navigate to the directory where your file is located using the cd command. For example, if your file is located in the ~/my_project directory, type cd ~/my_project in the PuTTY terminal.
  3. Once you are in the correct directory, you can run your Python file using the python command followed by the name of your file. For example, if your file is called my_script.py, type python my_script.py in the terminal and hit Enter.
  4. Your Python file will start running and you will see the output in the terminal.

Note that if your Python script requires any additional libraries or dependencies, you will need to make sure those are installed on your remote server before running the script.

@bhorsayli6 @Akshay