Example Scenario: Managing Python Versions
- Installing the Latest Version of Python:
# Install Python (this will install the latest version available in the repository)
sudo yum install python3
- Updating Python to a Specific Version (Python 3.10):
# First, check for available Python versions
sudo yum list available python3*
# Install Python 3.10
sudo yum install python3.10
- Note: If Python 3.10 is not available in the repository, students will need to add a repository that provides it.
- Removing Python (including Python 3.10):
# Remove Python (including Python 3.10)
sudo yum remove python3 python3.10
- This command will remove both Python 3 and Python 3.10 along with any related packages.
Notes:
- This example provides hands-on experience with managing Python versions, including installation, updating to a specific version, and removal.
- Students may need to adjust the commands depending on the availability of specific Python versions in their environment.
As always, ensure that students run these commands in a controlled lab environment to gain practical experience.