type
Post
status
Published
date
Jul 7, 2022
slug
article-2
summary
Anaconda 基本命令使用操作
tags
Python
anaconda
开发环境
category
技术分享
icon
password
Property
Jul 12, 2022 01:01 PM
创建虚拟环境
创建一个名字为 your_name 的虚拟环境,并且这个虚拟环境额外安装 jupyter notebook 第三方库。
conda create -n your_name python=latest juyter notebook
删除虚拟环境
conda remove -n xxx --all
查看已有环境
conda info -e conda env list
base 是 Anaconda 自带的环境
激活环境(切换到环境)
conda activate your_name
在虚拟环境中安装第三方库
conda install 包名
对于 conda 搜不到的包,也可以使用 pip 安装:
python -m pip install xxx
卸载第三方库
conda uninstall xxx
显示指定安装包的安装源
conda uninstall xxx
启动第三方库
需要安装的第三方库安装完毕,可使用命令直接打开 Jupyter Notebook:
juyter notebook
conda镜像源
添加清华源:
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 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
还原镜像源:
conda config --remove-key channels
pip镜像源(临时换源)
pip 后加参数 -i https://pypi.tuna.tsinghua.edu.cn/simple (清华源) 例: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow
- Author:mushan
- URL:https://blog.mushan.xyz/article/article-2
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts