FedoraRHEL Based

How To Install Miniconda on Fedora 40

How To Install Miniconda on Fedora 40

In this tutorial, we will show you how to install Miniconda on Fedora 40. Miniconda is a lightweight, streamlined version of the popular Anaconda distribution that focuses on providing a minimal setup for Python development. It includes the conda package manager and a small set of essential packages, making it an ideal choice for users who want a fast and efficient way to manage their Python environments on Fedora 40. By installing Miniconda on your Fedora 40 system, you can easily create and manage isolated Python environments, ensuring that your projects have access to the specific dependencies they require without interfering with other projects or the system’s Python installation.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Miniconda on a Fedora 40.

Prerequisites

Before we dive into the installation process, ensure that you have the following prerequisites in place:

  • A server running one of the following operating systems: Fedora 40.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • You will need access to the terminal to execute commands. Fedora 40 provides the Terminal application for this purpose. It can be found in your Applications menu.
  • A stable internet connection to download the necessary packages.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Miniconda on Fedora 40

Step 1. Update the System.

Keeping your system up-to-date is crucial for security and stability. Start by running the following command to update your Fedora 40 installation:

sudo dnf clean all
sudo dnf update

Step 2. Installing Miniconda on Fedora 40.

To get started, visit the official Miniconda website and download the latest installer for Linux. Choose the appropriate version based on your system architecture (x86 or x86_64) and the desired Python version (Python 3.x is recommended for most users). Once the download is complete, you’re ready to proceed with the installation.

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

Before running the Miniconda installer, it’s crucial to verify its integrity to ensure that the downloaded file hasn’t been tampered with or corrupted during the download process. One way to do this is by checking the installer’s SHA-256 checksum, which is a unique fingerprint of the file. The Miniconda website provides the expected SHA-256 checksums for each installer version. To verify the checksum on your Fedora 40 system, open a terminal and navigate to the directory where you downloaded the installer. Run the following command, replacing <installer.sh> with the actual filename:

sha256sum <installer.sh>

Compare the output of the command with the expected SHA-256 checksum provided on the Miniconda website. If they match, you can be confident that the installer is genuine and hasn’t been modified.

With the installer verified, you’re now ready to run it and start the installation process. In the terminal, ensure that you’re still in the directory where the installer is located. Make the installer script executable by running the following command:

chmod +x Miniconda3-latest-Linux-x86_64.sh

Now, run the Miniconda installer using the following command:

./Miniconda3-latest-Linux-x86_64.sh

The installer will start, and you’ll be prompted to review and accept the license agreement. Read through the agreement and press “Enter” to continue. Next, you’ll be asked to choose the installation location for Miniconda. By default, it will be installed in your home directory under ~/miniconda3. You can press “Enter” to accept the default location or specify a custom path if desired.

Finally, the installer will ask if you want to initialize Miniconda by running conda init. It’s recommended to choose “yes” to allow the installer to modify your shell configuration files (e.g., .bashrc) and automatically activate the base conda environment on shell startup.

After the installation is complete, close the current terminal and open a new one to ensure that the changes made by the installer take effect. In the new terminal, you should see the base conda environment activated by default, indicated by the (base) prefix in your command prompt. To ensure that you have the latest version of conda, run the following command:

conda update conda

Conda will check for available updates and prompt you to confirm the installation if any updates are found. Press “y” to proceed with the update. Once the update is complete, you can verify the installation by checking the conda version:

conda --version

Step 3. Creating a New Conda Environment.

One of the key benefits of using Miniconda is its ability to create isolated environments for your Python projects. Conda environments allow you to have separate sets of packages and dependencies for each project, avoiding conflicts between different versions of libraries and ensuring reproducibility. To create a new conda environment, use the following command:

conda create --name myenv python=3.9

Replace myenv with your desired environment name and 3.9 with the specific Python version you want to use. Conda will resolve the dependencies and create a new environment with the specified Python version.

To activate the newly created environment, run:

conda activate myenv

Your command prompt will now show the active environment name. You can install packages specific to this environment using conda install or pip install commands. When you’re done working in the environment, you can deactivate it with:

conda deactivate

Congratulations! You have successfully installed Miniconda. Thanks for using this tutorial for installing the Miniconda on your Fedora 40 system. For additional or useful information, we recommend you check the official Miniconda website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button