[Installation Handbook]uninstall pip and then install miniforge on ubuntu

发布于:2024-12-19 ⋅ 阅读:(9) ⋅ 点赞:(0)

To uninstall pip and then install miniforge on an Ubuntu system, you can follow these steps. Keep in mind that completely removing pip can break dependencies for Python packages and is generally not recommended unless you're sure about the implications. Here’s how you can proceed:

1. Uninstall pip

First, to uninstall pip, you can use the following command:

sudo apt remove python3-pip

This command removes the pip installer from your system, but it won’t remove any packages installed with pip.

2. Install Miniforge

To install Miniforge, you would typically follow these steps:

Step 1: Download Miniforge

You can download the Miniforge installer script for Linux. Use wget to download it directly to your Ubuntu system:

wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh

Make sure to check the Miniforge GitHub page for the latest version or different system architectures.

Step 2: Install Miniforge

After downloading, run the installer script:

bash Miniforge3-Linux-x86_64.sh

Follow the on-screen instructions to complete the installation. Typically, it involves agreeing to the license terms and specifying the installation directory.

Step 3: Initialize Miniforge

Once installed, you can initialize Miniforge to configure your shell:

source ~/miniforge3/bin/activate

And then, to make the change permanent for all future terminal sessions, you can initialize Conda for your shell (replace .bashrc with the configuration file of your shell, e.g., .zshrc for Zsh):


bash

Copy code

conda init

3. Verify Installation

After installation, you can verify that Miniforge is installed correctly by checking the Conda version:

conda --version

And update Conda to the latest version:

conda update conda

This process will set up Miniforge, which includes Conda. You can then use Conda to manage Python packages and environments, providing a robust alternative to pip.