What does conda source change mean?

小老鼠
Release: 2023-11-23 17:44:55
Original
2165 people have browsed it

Conda source change means that the official source download speed is slow or cannot be connected. In order to solve this problem, the source needs to be changed. Changing the source of conda means changing the default source of conda to a domestic mirror source. Commonly used domestic mirror sources include Tsinghua University, University of Science and Technology of China, Alibaba Cloud, etc. They provide the same packages as the official sources, but the download speed is faster.

What does conda source change mean?

The operating system for this tutorial: Windows 10 system, Python version 3.11.4, Dell G3 computer.

When using Anaconda or Miniconda for Python package management, conda downloads packages from the official source (default is https://repo.anaconda.com) by default. However, due to network reasons or geographical location restrictions, sometimes downloading speeds from official sources are slow or unavailable. In order to solve this problem, you can replace the conda source with a domestic mirror source to speed up the download speed.

Changing the source of conda means changing the default source of conda to a domestic mirror source. Commonly used domestic mirror sources include Tsinghua University, University of Science and Technology of China, Alibaba Cloud, etc. They provide the same packages as the official sources, but the download speed is faster.

The specific steps for changing the source are as follows:

Open a terminal or command line window.

Enter the following command to replace the default source of conda with the domestic mirror source (taking Tsinghua University mirror source as an example):

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
Copy after login

After executing the above command, the source of conda has been replaced It is the mirror source of Tsinghua University.

By changing the source, you can speed up the downloading speed of conda packages and improve the efficiency of using conda for package management. If you need to restore to the official source, you can use the following command:

conda config --remove-key channels
Copy after login

It should be noted that there may be differences between different mirror sources, and there may be some packages that cannot be found in the mirror source. When switching sources, it is recommended to choose a stable and reliable mirror source, and pay attention to check whether the required packages are available during actual use.

The above is the detailed content of What does conda source change mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!