How to install Python on Fedora 43

Cover Image

Getting Started with Python on Fedora 43: A Beginner's Guide

Welcome to the world of Python on Fedora 43! Python is a fantastic language to learn, whether you're just starting out in programming or you're a seasoned developer. It's used for everything from web development and data science to scripting and automation. Fortunately, getting Python up and running on Fedora 43 is straightforward. Let's dive in!

Checking if Python is Already Installed

Believe it or not, Python might already be on your system! Fedora often comes with Python pre-installed. To check, open your terminal (you can usually find it in your applications menu or by searching for "terminal") and type:

python3 --version

If you see a version number, something like "Python 3.12.0", then you're good to go! You already have Python 3 installed. If you get an error message saying "command not found", then proceed to the next section.

Installing Python 3

If Python isn't already installed, don't worry! Installing it is super easy using Fedora's package manager, dnf. Open your terminal and type the following command, then press Enter:

sudo dnf install python3

You'll likely be prompted to enter your password. Go ahead and enter it. You might also be asked to confirm the installation by typing "y" and pressing Enter. dnf will download and install Python and any necessary dependencies for you. This might take a few minutes, depending on your internet speed.

Verifying the Installation

After the installation is complete, it's a good idea to verify that Python is installed correctly. Type the following command again in your terminal:

python3 --version

You should now see the version number of Python 3 that was installed. This confirms that Python is ready to use.

Optional: Installing pip (Package Installer for Python)

pip is a powerful tool that allows you to easily install and manage Python packages (libraries) from the Python Package Index (PyPI). It's highly recommended that you install pip, as it will make your life much easier when working with Python projects. To install pip, use the following command:

sudo dnf install python3-pip

Again, you may be prompted to enter your password and confirm the installation. Once installed, you can verify pip by checking its version:

pip3 --version

Getting Started with Python

Congratulations! You now have Python installed and ready to go on your Fedora 43 system. You can start writing Python code, running scripts, and installing packages using pip. Here are a few ideas to get you started:

  • Write a simple "Hello, World!" program.
  • Explore online Python tutorials and documentation.
  • Install a code editor like VS Code or Atom to make writing code easier.

Happy coding!