Anaconda使用笔记

一、Windows

Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(502): An error occurred while uninstalling package 'defaults::conda-4.5.4-py36_0'.
PermissionError(13, '拒绝访问。')
Attempting to roll back.

  • 修改anaconda镜像
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/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
  • 修改pip镜像,可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple 
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
  • 常用包管理命令
conda list
conda install package_name
conda remove package_name
conda update package_name
  • 常用环境管理命令
conda env list
conda create -n python36 python=3.6
conda activate python36
conda deactivate
conda remove -n python36 --all
  • pycharm配置python环境

Setting-》Project Interpreter-》点击小齿轮,Add-》选择Conda Environment-》选择Existing environment-》选择合适的python环境

  • 导出环境
# 先进入想要导出的环境
conda activate xxx
conda env export  --file xxx-bak.yml 
  • 导入环境
conda env create -f xxx-bak.yml

2.Linux

  • 安装anaconda
wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
 bash Anaconda3-5.0.1-Linux-x86_64.sh

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值