conda 管理 python 版本

conda经常使用命令

  • 查看当前系统下的环境
conda info -e
  • 建立新的环境
# 指定python版本为2.7
conda create -n env_name python=2.7
# 同时安装必要的包
conda create -n env_name numpy matplotlib python=2.7
  • 环境切换
# linux/Mac下须要使用source activate env_name
activate env_name
#退出环境
deactivate env_name
  • 移除环境
conda remove -n env_name --all

3、包管理

  • 给某个特定环境安装package有两个选择,一是切换到该环境下直接安装,二是安装时指定环境参数-n
activate env_nameconda install pandas
# 安装anaconda发行版中全部的包
conda install anaconda
conda install -n env_name pandas
  • 查看已经安装的package
conda list
# 指定查看某环境下安装的package
conda list -n env_name
  • 查找包
conda search pyqtgraph
  • 更新包
conda update numpy
conda update anaconda
  • 卸载包
conda remove numpy

 

Installing tensorflow from the conda-forge channel can be achieved by adding conda-forge to your channels with:python

conda config --add channels conda-forge

Once the conda-forge channel has been enabled, tensorflow can be installed with:linux

conda install tensorflow

It is possible to list all of the versions of tensorflow available on your platform with:git

参考:https://github.com/conda-forge/tensorflow-feedstockconda search tensorflow --channel conda-forge
相关文章
相关标签/搜索