AI for Everyone LESSON 2: Running Two Different Versions of Python on the Same Computer

Paul McWhorter
27 Jul 202132:48

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

00:00

๐Ÿ˜€ 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.

05:01

๐Ÿ’ป 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.

10:01

๐Ÿ”ง 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.

15:03

๐Ÿ›  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.

20:03

๐Ÿ“ 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.

25:04

๐Ÿ 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

Python is a high-level, interpreted programming language known for its readability and็ฎ€ๆดๆ€ง. In the video, the host discusses the importance of running multiple versions of Python on the same computer, which is crucial for managing different projects with varying dependencies. The script includes instructions on how to download and install Python 3.9.6, demonstrating its use in the context of AI and programming tutorials.

๐Ÿ’กMultiple Versions

Running multiple versions of Python allows developers to work on different projects that may require different dependencies without conflicts. The video emphasizes the necessity of understanding how to manage these versions, especially when some projects might need specific versions of Python or libraries that are not compatible with others.

๐Ÿ’กVirtual Environments

Virtual environments are isolated spaces that allow developers to create isolated Python environments for different projects. This concept is mentioned as a tool to enhance the management of multiple Python versions. The host promises to cover virtual environments in detail in a future lesson, highlighting their importance in maintaining a clean and organized development workflow.

๐Ÿ’กPatreon

Patreon is a crowdfunding platform where creators can receive financial support from their audience, or patrons. In the script, the host gives a shout out to patrons on Patreon, indicating that their support helps in creating content like the tutorial series. This is an example of community engagement and support for educational content creation.

๐Ÿ’กDuckDuckGo

DuckDuckGo is a search engine that emphasizes protecting user privacy and not tracking users' search activity. The host specifically instructs the audience to use DuckDuckGo to search for 'Python download,' showcasing a preference for privacy-focused tools in the tutorial process.

๐Ÿ’กPATH

The PATH is an environment variable on computers running Windows, Linux, or macOS. It tells the system which directories contain executables that can be run from the command line. In the video, the host explains how to modify the PATH variable to control which version of Python is executed when typing 'python' in the command prompt, which is essential for managing multiple Python installations.

๐Ÿ’กPython Launcher

The Python Launcher for Windows is a utility that allows users to run multiple versions of Python easily. The script mentions using 'py' to launch the most recent version of Python or specifying a version with 'py -3.x'. This tool simplifies the process of switching between different Python versions.

๐Ÿ’กpip

pip is a package installer for Python. It allows users to install and manage additional libraries and dependencies. The video script includes an example of using pip to install the 'pyserial' library, demonstrating how to manage packages within a specific Python version.

๐Ÿ’ก3D Animations and Graphics

While not the main focus of the video, the host mentions that one of the series of lessons will involve using Python for 3D animations and graphics. This suggests that the video series aims to cover a broad range of applications for Python, including those in multimedia and design.

๐Ÿ’กHomework

The host assigns 'homework' as a way to engage viewers in practicing what they've learned in the tutorial. This includes installing multiple versions of Python and ensuring they can manage and use them effectively. The use of homework reinforces the educational aspect of the video series, encouraging active learning and application of the concepts discussed.

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.