安装方案1
- 已有环境卸载:conda uninstall env_name
- 创建新的环境:
第一步:导入下载镜像地址,加速下载。配置国内源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaonda/pkgs/main/
第二步:现实源地址
conda config --set show_channel_urls yes
第三步:安装
先建一个TF14C环境,使用python3.6,最后面加anaconda会下载很多依赖包:
conda create -n TF14C python=3.6 anaconda
#安装命令为:conda install tensorflow==1.7.0
或者安装离线tf包:
pip install D:\安装包\tensorflow-1.4.0rc1-cp36-cp36m-win_amd64.whl
第四步:安装jupyter notebook
conda install jupyter
安装方案2
先创建环境:conda create -n tensorflow python=3.5
再激活环境:activate tensorflow
再安装:pip install +复制链接(tensorflow的下载地址链接)
备注:
1、查看当前有哪些版本的tensorflow可以安装:
conda search --full-name tensorflow
2、查看当前有哪些版本的python可以安装:
conda search --full-name python
3、查找安装软件:
查看有没有
conda search gatk
查看安装位置
which gatk
4、指定安装版本
conda install 软件名=版本号
conda install gatk=3.7
5、conda的环境管理
创建环境:conda create --name py35 python=3.5
激活环境:activate py35 # for Windows
退出环境:deactivate py35 # for Windows
删除环境:conda remove --name py35 --all
查看环境:conda info -e
安装库:conda install numpy
查看库:conda list
查看环境包:conda list -n py35
查看包信息:conda search numpy
安装包到指定环境:conda install -n py35 numpy
更新包:conda update -n py35 numpy
删除包:conda remove -n py35 numpy
更新conda:conda update conda
更新anaconda:conda update anaconda
更新python:conda update python
##假设当前环境是python 3.5
##conda会将python升级为3.5.x系列的当前最新版本
6、设置国内镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
7、更新
python -m pip install --upgrade pip
8、镜像位置
查看镜像位置:conda config --show channels
查看镜像文件地址:conda config --show-sources