Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
人
人工智能系统实战第三期
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyinkai
人工智能系统实战第三期
Commits
e3dee0f8
Commit
e3dee0f8
authored
Aug 22, 2023
by
前钰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Anaconda常用指令及换源.md
parent
bbb2504f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
128 deletions
+1
-128
Anaconda常用指令及换源.md
人工智能系统实战第三期/实战代码/K近邻车牌识别/Anaconda常用指令及换源.md
+1
-128
No files found.
人工智能系统实战第三期/实战代码/K近邻车牌识别/Anaconda常用指令及换源.md
deleted
100644 → 0
View file @
bbb2504f
**一、Anaconda常用指令**
++ /dev/null
**一、Anaconda常用指令**
打开Anaconda Prompt终端,在终端中运行如下代码:
1.
查看conda版本
```
conda --version 或 conda -V
```
2. 更新conda(将conda自身更新到最新版本)
```
conda update conda
```
3. 创建虚拟环境
```
conda create -n env_name python=3.9
```
这表示创建一个名为env_name的环境并指定Python版本为3.9(-n中的n即是name)。
4. 激活虚拟环境
```
conda activate env_name
```
使用如上命令可激活创建的虚拟环境。
5. 退出虚拟环境
```
conda deactivate
```
使用如上命令可以退出当前正在使用的虚拟环境。
6. 删除虚拟环境
```
conda remove -n env_name --all 或 conda remove --name env_name --all
```
使用如上命令将名为env_name的虚拟环境以及其中的包都删除。
7. 列出所有虚拟环境
```
conda env list 或 conda info --envs
```
8. 列出当前环境的所有包
```
conda list
```
9. 安装第三方包
```
conda install dill 或 pip install dill
```
使用如上指令安装名为dill的软件包。
10. 卸载第三方包
```
conda uninstall dill 或 pip uninstall dill
```
使用如上指令卸载名为dill的软件包。
**二、Anaconda更换默认下载源(可选):**
1. 打开Anaconda Prompt,然后输入如下命令添加清华源:
```
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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
```
2. 设置搜索时显示通道地址
```
conda config --set show_channel_urls yes
```
设置pip为清华源(打开Anaconda Prompt,输入如下代码):
```
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
```
换源中常用的命令及含义:
1. 显示安装通道
```
conda config --show channels
```
2. 添加源
```
conda config --add channels url地址
```
3. 删除源
```
conda config --remove channels url地址
```
例如:conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
4. 恢复默认源(换回默认设置)
```
conda config --remove-key channels
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment