Miniconda安装及使用

一、Miniconda安装

首先使用下面的地址安装Miniconda,我使用的是windows环境,python 3.10

Miniconda — conda documentation

安装完之后

  • linux会自动设置环境变量
  • windows下使用"Anaconda Powershell Prompt (miniconda3)"命令行进行操作,也可以自己设置环境变量
  • 如果自己设置变量在windows下自带的powershell中打开需要使用初始化命令"conda init powershell"

 

二、设置国内源

这里比较关键,默认情况下

  • 国外源比较慢或者不能访问
  • 国内源会有SSL验证失败的问题
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/  
conda config --set ssl_verify False
conda config --set show_channel_urls yes

channel的一些操作

查看已经设置的channel

conda config --show channels

清除所有的channel

conda config --remove-key channels

三、新建python环境

conda create -n tensorflow python=3.9

激活与退回python虚拟环境

conda activiate tensorflow
conda deactivate

 四、环境相关操作

查看所有环境

 conda env list

 

posted on 2023-02-20 16:01  Netsharp  阅读(299)  评论(0编辑  收藏  举报

导航