SoFunction
Updated on 2024-11-17

Deep learning environment configuration of Anaconda installation and pip source method

conda is a generic package management system, similar to pip, and environment management allows users to easily install different versions of python and quickly switch between them.

Anaconda, on the other hand, is a collection of packages with conda, some version of python, numerous packages, scientific computing tools, and so on, that is, a lot of commonly used libraries that are not commonly used are loaded for you.

Miniconda, as the name suggests, contains only the bare essentials - python with conda, and the associated mandatory dependencies. For deep learning projects based on, miniconda works fine!

1. conda download

The conda download address for Clearwater Source:

  • anaconda : Index of /anaconda/archive/ | Tsinghua Open Source Software Mirror | Tsinghua Open Source Mirror
  • miniconda : Index of /anaconda/miniconda/ | Tsinghua Open Source Software Mirror | Tsinghua Open Source Mirror 

The latest one is not recommended here, just download the corresponding file according to your system.

2. Installation

Once the download is complete, just install it

For this step, it is recommended to check the second box (Add to environment path)

3. Operation

Search for anaconda in the search box, the first anaconda prompt to open is the

Runs as follows

This step is not necessary, mainly to test whether the installation is successful or not

If you want to open it later, just type it in the dos window.

4. Orders concerning conda

  • View conda virtual environment: conda info --envs
  • New virtual environment: conda create -n demo python=3.8 (demo is a custom environment name)
  • Remove the virtual environment: conda env remove --name demo
  • Activate the virtual environment: conda activate demo (demo is a customized environment name)

5. Configure pip domestic sources

Subsequent to the conda environment to install library files, using pip installation, replace the domestic mirror source can speed up the download speed

The Tsinghua mirror source is used here

Website:pypi | Mirror Station Help | Tsinghua Open Source Software Mirror | Tsinghua Open Source Mirror

pip config set -url /simple

TIPS: After activating the new virtual environment created by conda and entering it, copy the above commands!

There's a line that says "writing to" and that's it.

summarize

The above is a personal experience, I hope it can give you a reference, and I hope you can support me more.