Python(1) Anaconda流水账

来源:互联网 发布:市场上主流单片机 编辑:程序博客网 时间:2024/06/05 14:30

0. 资料

  • 官网

1. Windows安装

  • 建议使用清华镜像下载。
  • 安装完成后,使用清华镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --set show_channel_urls yes

2. Ubuntu

  • 从清华镜像下载对应镜像。
  • 安装
sudo bash Anaconda3-4.3.0-Linux-x86_64.sh # 一路回车+yes(注意最后一步是问是否要将Anaconda安装到系统路径)# 安装完成后,设计清华镜像conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --set show_channel_urls yes

3. 建立新环境

# 安装conda create --name tensorflow python=3.5# 激活activate tensorflow # Windowssource activate tensorflow # Linux & Mac# 撤销激活deactivate tensorflow # Windowssource deactivate tensorflow # Linux & Mac# 删除conda remove --name tensorflow --all

3. 基本操作

conda listconda install numpyconda uninstall numpy

4. 碰到的问题

  • 使用Conda安装Keras时,不能使用tensorflow-gpu版,只能使用cpu版。
    • 解决方案:keras和tensorflow都使用pip安装。
  • 不能安装happybase。
    • 解决方案:使用pip安装。