"AlgoPlus User Manual" Installing Anaconda

download

1. Anconda3 64-bit is recommended

Official website: https://www.anaconda.com/distribution/Tsinghua
Mirror: https://mirrors.tuna.tsinghua.edu.cn/anaconda/

2. Patients with severe obsessive-compulsive disorder can choose Miniconda3 64-bit

Official website: https://docs.conda.io/en/latest/miniconda.html
Tsinghua Mirror: https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/

Windows installation

1. Complete the installation according to the prompts. When encountering Advanced Options, please check the following options:
Insert image description here
2. Check whether the installation is successful. Execute the python command in cmd, I hope you can see the following:
Insert image description here
If you see:
Insert image description here
We can only express our regret for this first, and then sympathize with you. Finally, please follow the steps below to add environment variables:

① Open a folder at random, right-click [My Computer] in the left column, and left-click the [Properties] option in the menu; ② Left-click [Advanced
Insert image description here
System Settings] in the new window;
Insert image description here
③ In the new window Left-click the [Advanced] tab in the window, and then left-click the [Environment Variables] button;
Insert image description here
④ Click the [Path] entry in the user variables (or system variables) list of the new window;
Insert image description here
⑤ Change the Anaconda installation directory [ The full paths of the three folders \Library\usr\bin], [\Library\bin], and [\s] are added. For example:

C:\plus\miniconda3

C:\plus\miniconda3\s

C:\plus\miniconda3\Library\bin

C:\plus\miniconda3\Library\usr\bin
is not good, it seems that some secret is about to be discovered.
Insert image description here
3. Re-open a cmd window and check whether the installation is successful. If your luck is a little bit bad, please consult in the community (ctp.plus).

Replace Tsinghua Source and enjoy the feeling of flying

1. Execute the following command to change the conda source:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge conda 
config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ conda config --set 
show_channel_urls yes 

2. Execute the following command to change the pip source:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U 
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple 

virtual environment

When multiple development versions are being promoted at the same time, in order to avoid affecting the production environment, a virtual environment can be created. For example, when CTP penetration was first implemented, the penetration version and the non-penetration version ran at the same time. By creating a penetrating virtual environment, you can avoid debugging new version interfaces from affecting the production environment.

1. Create a virtual environment codenamed ctp_dev (set as needed)

conda create --name ctp_dev python=3.7

2. List all environment information, where base is the default main environment.

conda env list

3. When you need to use the ctp_dev virtual environment, you only need to use the following code to activate. After activation, all operations will be performed in the virtual environment directory (Miniconda3\envs\ctp_dev).

activate ctp_dev

4. Exit the current virtual environment

conda deactivate

5. Delete the virtual environment codenamed ctp_dev

conda remove --name ctp_dev --all

Insert image description here

A must-read for patients with obsessive-compulsive disorder

1. Update

conda update conda
conda update anaconda
conda update --all

2. Delete unused packages in the writable package cache.

conda clean -p 

3. Delete the cached tar package

conda clean -t

4. Delete index cache, locked files, unused cache packages and tar packages

conda clean -all

uninstall

Nani? You actually want to uninstall it? There is no way! The windows are all sealed! Take the deal to the end with us!

(Changes to a smiling face) Uncle, the next tutorial is also prepared for you, be sure to come and play...

Guess you like

Origin blog.csdn.net/AlgoPlus/article/details/102140980