anaconda初步使用命令
1、配置通道源
conda config --add channel
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channel
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
2、虚拟环境
conda create -n myenv python=3.8
conda activate myenv
conda deactivate
conda env list
conda env remove -n tensorflow
conda remove -n tensorflow --a
3、安装包
conda install mtcnn #当前环境下安装mtcnn
conda activate myenv #切换环境
pip install numpy #当前环境下安装numpy
conda list #查看当前环境下已经安装的文件包
conda list -n tensorflow #查看环境中安装的包
conda update [package] #更新环境中安装的包
conda uninstall xxx #御载
anaconda search -t conda tensorflow #搜索安装包
anaconda show anaconda/tensorflow #显示安装包详细
conda install --channel [Package repository for anaconda] tensorflow==2.0 #当前环境安装文件包,从特定通道安装下载
conda clean -p #清理没有用的包
conda clean -t #tar打包
conda clean -y -a #删除所有的安装包及cache
4、Jupyter notebook
jupyter notebook #启动
#生成配置文件
jupyter notebook --generate-config
#c:\Users\[用户]\.jupyter\jupyter_notebook_config.py
#c.NotebookApp.notebook_dir = [u]'d:\\ProgramFiles\\Anaconda3\\envs\\TensorFlow\\notebook'
jupyter kernelspec list #查看安装的核
#安装ipykernel:
conda install ipykernel
#为虚拟环境下创建kernel文件:
conda install -n tensorflow ipykernel
#or
pip install ipykernel -i https://pypi.tuna.tsinghua.edu.cn/simple
#激活环境:
conda activate myenv
#将环境写入notebook的kernel中
python -m ipykernel install --name myenv
#or
python -m ipykernel install --user --name myenv --display-name "myenv"
5、anaconda
#更新
conda update conda
conda update anaconda
conda update anaconda-navigator
#御载
#1.添加删除程序
#2.anaconda3\Uninstall-Anaconda3.exe
#3.rm -rf anaconda & ~/bash.rc

浙公网安备 33010602011771号