21CS62 Program 1

1. Installing Python:

  1. Download Python:
  • Go to the official Python website: python.org.
  • Navigate to the Downloads section and download the latest version of Python for your operating system (Windows, macOS, or Linux).
output
  1. Install Python:
  • Once the download is complete, run the installer.
  • Make sure to check the box that says “Add Python to PATH” during the installation process.
  • Click on “Install Now” to complete the installation.
output
  1. Verify Installation:
  • Open a command prompt (on Windows) or terminal (on macOS or Linux).
  • Type python --version or python3 --version and press Enter.
  • You should see the installed Python version printed, confirming that Python is installed correctly.
output

2. Installing Django:

  1. Install Django using pip:
  • Open a command prompt or terminal.
  • Type pip install django and press Enter.
  • Pip is the package installer for Python, and it will download and install Django and its dependencies.
output
  1. Verify Django Installation:
  • After installation, you can verify Django by typing pip show django in the command prompt or terminal.
  • You should see the installed Django version printed, confirming that Django is installed correctly.
output

3. Installing Visual Studio Code (VS Code):

  1. Download VS Code:
  • Go to the official Visual Studio Code website: code.visualstudio.com.
  • Click on the Download for [Your Operating System] button to download the installer.
output
  1. Install VS Code:
  • Run the downloaded installer.
  • Follow the installation wizard instructions.
  • During installation, you can choose options like adding VS Code to the PATH for easy access from the command line.
output
  1. Open VS Code:
  • After installation, open Visual Studio Code.
  • You can open VS Code from the Start Menu (Windows), Applications folder (macOS), or from the installed directory (Linux).
output

Demonstrating the Installation:

  • Once everything is installed:
  • Open VS Code.
  • Create a new folder for your Django project.
  • Open this folder in VS Code.
  • Open a terminal in VS Code (Ctrl + or Cmd +) and start a new Django project by running django-admin startproject myprojectname.
  • Navigate into the project folder and start the Django development server with python manage.py runserver.
  • You can now access your Django application by visiting http://localhost:8000 in your web browser.
output

Leave a Reply

Your email address will not be published. Required fields are marked *