AI for Everyone LESSON 2: Running Two Different Versions of Python on the Same Computer
TLDRIn this tutorial, Paul McQuarter from Toptechboy.com teaches viewers how to run multiple versions of Python on the same computer, a skill essential for handling different programming projects. He guides through downloading Python 3.9.6 and 3.7.9, installing them, and configuring the system environment to switch between versions using the command line. The lesson also touches on using 'pip' for package management and the importance of Python environments for project isolation. Paul promises to delve into more advanced AI topics soon and assigns homework to practice these skills.
Takeaways
- 😀 The tutorial series aims to teach artificial intelligence, starting with foundational knowledge.
- 🛠️ The lesson focuses on running multiple versions of Python on one computer, which is essential for handling different programming tasks.
- ☕️ Paul recommends having a cup of black iced coffee while learning, setting a relaxed tone for the tutorial.
- 💻 The necessity of understanding how to manage multiple Python versions is emphasized to avoid confusion in future lessons.
- 🔗 A shout-out to Patreon supporters is given, with an invitation for others to join and support the content creation.
- 🌐 The process of downloading Python from python.org is detailed, including selecting the correct version (3.9.6) and installation steps.
- 💾 It's important to install the Python launcher for all users and to add Python to the system path for easy access.
- 🔍 The video demonstrates how to verify Python installation using PowerShell and how to use Python and pip to install packages.
- 🆚 Two methods are shown for managing multiple Python versions: adjusting the system's PATH variable and using the 'py' launcher.
- 🛠️ The lesson concludes with homework for viewers to install multiple Python versions and practice managing them with pip.
- 🐍 A secret word 'black mamba' is shared, referencing a personal anecdote about encountering a dangerous snake, used to engage the audience.
Q & A
What is the main topic of the second lesson in the AI for Everyone tutorial series?
-The main topic of the second lesson is learning how to run multiple versions of Python on one computer.
Why is it necessary to run different versions of Python as discussed in the tutorial?
-It is necessary to run different versions of Python because some projects or tasks may require specific versions of Python, and being able to switch between them is crucial for compatibility and functionality.
What is the first step the presenter suggests to download Python in the tutorial?
-The first step suggested by the presenter is to use the DuckDuckGo search engine and search for 'python download'.
What version of Python does the presenter install and use as an example in the tutorial?
-The presenter installs and uses Python 3.9.6 as an example in the tutorial.
How does the presenter verify that Python has been installed correctly on the computer?
-The presenter verifies the installation by opening PowerShell and typing 'python' to see if the Python interpreter starts and by typing 'python --version' to check the version.
What is the purpose of the Python Launcher mentioned in the tutorial?
-The Python Launcher allows users to easily switch between different installed versions of Python and manage packages across those versions.
How can users install packages using pip after installing a specific version of Python?
-Users can install packages using pip by typing 'pip install
' in the command line, and the package will be installed for the version of Python that is currently on top of the PATH environment variable. What is the importance of managing PATH environment variables when dealing with multiple versions of Python?
-Managing PATH environment variables is important because it determines which version of Python is executed when the 'python' command is typed into the command line.
What is the 'secret word' given by the presenter at the end of the tutorial for viewers to use in the comments?
-The 'secret word' given by the presenter is 'black mamba'.
What homework does the presenter assign to the viewers at the end of the lesson?
-The presenter assigns the homework of installing the latest versions of Python 3.6, 3.7, 3.8, and 3.9, and verifying that pip can install packages into each one using the techniques shown in the tutorial.
Outlines
😀 Introduction to AI Tutorial Series
Paul McQuarter from toptechboy.com introduces episode two of a tutorial series on artificial intelligence. He humorously suggests pouring a black iced coffee and emphasizes the importance of foundational knowledge for the course. He acknowledges Patreon supporters and invites new ones, highlighting their role in enabling content creation. The lesson's focus is on running multiple Python versions on one computer, which is crucial for handling different AI tasks requiring various Python environments.
💻 Installing Python 3.9.6
The tutorial proceeds with a step-by-step guide to install Python 3.9.6, emphasizing the need to add Python to the system path for easy access. Paul demonstrates installing Python using the official website and ensures that the installation launcher is set for all users. He then verifies the installation via PowerShell, showing how to use Python and pip to install and uninstall packages, specifically 'pi serial', and explains the significance of managing Python versions and packages for different projects.
🔧 Managing Multiple Python Versions
Paul tackles the challenge of managing multiple Python versions on the same machine. He illustrates how to install Python 3.7.9 alongside the previously installed Python 3.9.6, stressing the importance of having the 'python launcher' for managing different versions smoothly. The section includes a practical demonstration of downloading, installing, and configuring the new Python version, ensuring it doesn't overwrite the existing setup.
🛠 Controlling Python Execution with PATH
This section delves into how the system PATH variable controls which Python version gets executed when typing 'python' in the command line. Paul shows how to manipulate the PATH order to control the default Python version, moving Python 3.9 to the top of the PATH list for precedence. He also introduces the 'py' launcher as an alternative way to specify the Python version directly from the command line, offering flexibility and control.
📝 Homework Assignment and Version Control
Paul assigns homework to install multiple Python versions and verify the ability to manage installations and executions across them. He introduces the concept of 'pip' with version specifiers to control where packages are installed. The segment reinforces the importance of version control for different projects and sets the stage for upcoming lessons on Python environments, which will provide further isolation for project dependencies.
🐍 Wrapping Up and Upcoming Lessons
In the concluding part, Paul summarizes the lesson, assigns homework, and teases the next tutorial on Python environments. He uses a personal anecdote about a black mamba encounter to engage viewers, providing a memorable 'secret word' for interaction. He also stresses the practical applications of the lessons, such as managing dependencies for AI and 3D animation projects, and encourages viewers to engage with the content and provide feedback.
Mindmap
Keywords
💡Python
💡Multiple Versions
💡Virtual Environments
💡Patreon
💡DuckDuckGo
💡PATH
💡Python Launcher
💡pip
💡3D Animations and Graphics
💡Homework
Highlights
Introduction to the tutorial series on artificial intelligence by Paul McQuarter from toptechboy.com.
Emphasis on the importance of foundational knowledge in artificial intelligence.
The necessity of learning to run multiple versions of Python on one computer.
Explanation of how to enhance Python usage with virtual environments.
Step-by-step guide on downloading and installing Python 3.9.6 from python.org.
Instructions on configuring Python installation to add Python to PATH for all users.
Demonstration of verifying Python installation using Windows PowerShell.
How to write and execute a simple 'Hello World' program in Python.
Explanation of how to use pip to install packages for Python.
Guide on uninstalling packages using pip to revert changes.
Tutorial on downloading and installing an additional Python version (3.7.9).
How to manage multiple Python versions using the system PATH variable.
Technique to switch between different Python versions using the command line.
Understanding the difference between 'python' and 'pi' commands in Python launcher.
How to control Python and pip versions using specific commands.
Homework assignment to install multiple Python versions and practice package installation.
Introduction of the secret word 'black mamba' for engaging with the audience.
Announcement of the next lesson's topic: using Python environments for project isolation.