What You Will Learn
In this lesson, you’ll learn:
- Why is Python used for AI development
- How to install Python for AI
- How to verify the installation
- Common installation mistakes
Why Do We Need Python?
Python is the most popular programming language for Artificial Intelligence because it is:
- Easy to learn
- Simple to read
- Supported by major AI libraries
- Used by most AI developers
We’ll use Python throughout this course to build our AI Assistant.
Step 1: Download Python
Visit the official Python website and download the latest stable version for your operating system. Choose the installer for:
- Windows
- macOS
- Linux
Always download Python from the official website.
Step 2: Run the Installer
Open the downloaded installer. Before clicking Install Now, make sure you enable:
✅ Add Python to PATH
This option allows you to use Python from the Command Prompt or Terminal.
Now click Install Now.
Wait until the installation is complete.
Step 3: Verify the Installation
Open:
- Command Prompt (Windows)
- Terminal (macOS/Linux)
Run the following command:
python --version
If Python doesn’t work, try:
python3 --version
Example output:
Python 3.13.2
If you see the version number, Python is installed successfully.
Step 4: Open the Python Interpreter
Run:
python
or
python3
You should see something similar to:
Python 3.13.2
>>>
The >>> symbol means you’re inside the Python interpreter.
Exit by typing:
exit()
Common Mistakes
Python command not found
Python is installed, but PATH is not configured correctly.
Installed an old version
Always install the latest stable version unless your project requires a specific version.
Downloaded Python from another website
Only download Python from the official website.
Key Points
- Python is the preferred language for AI development.
- Always install the latest stable version.
- Enable Add Python to PATH during installation.
- Verify the installation using
python --version.
Mini Quiz
1. Which programming language will we use in this course?
A. Java
B. C++
C. Python
D. PHP
Answer: C
2. Which option should you enable during installation?
A. Install Games
B. Add Python to PATH
C. Enable Debug Mode
D. Install SQL
Answer: B
3. Which command checks the installed Python version?
A.
python --version
B.
python install
C.
python start
D.
python update
Answer: A
4. What does >>> indicate?
A. Python is running.
B. Python is uninstalled.
C. Python has crashed.
D. Python is downloading packages.
Answer: A
5. Where should you download Python?
A. Any website
B. Official Python website
C. GitHub
D. Stack Overflow
Answer: B
Practice Exercise
Complete these tasks:
- Install Python.
- Verify the installation.
- Open the Python interpreter.
- Run:
print("Hello, AI!")
If you see the output:
Hello, AI!
Congratulations! Your system is ready for AI development.
Lesson Summary
You have successfully installed Python and verified that it is working correctly. Your development environment is now ready for the next step, where we’ll install a professional code editor.
Written by Shubhranshu Shekhar, who has trained 20000+ students in coding.
Shubhranshu Shekhar is a coding instructor, mentor, and founder of VSIT Delhi with 20+ years of teaching experience (since 2004). He has guided many students who are now working in multinational companies and specializes in Full Stack Development, Python, Digital Marketing, and Data Analytics.
