Anaconda安装时勾选All User和启用环境变量
可切换为清华镜像
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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yespython
anaconda-navigator没法打开的解决办法
conda update anaconda-navigator
anaconda-navigator --reset
conda update anaconda-client
conda update -f anaconda-client测试
打开Anaconda-Navigator->Environments->base(root)修改python版本到3.6.8
python3.7目前对tensorflow2.0支持很差url
在Anaconda里建立名为tensorflow的环境
conda create -n tensorflow python=3.6.8ip
进入tensorflow环境
activate tensorflowcmd
查看Anaconda里的环境
conda info --envspip
在cmd里先执行如下两行
easy_install pip
pip install--upgrade pip
回到Anaconda Prompt
pip install tensorflow或
pip install --upgrade --ignore-installed tensorflow
若是报错超时,延长超时时间
pip install --upgrade --ignore-installed tensorflow --default-timeout=100import
安装完成后,能够对其进行测试,在终端输入
import tensorflow as tf
引用tensorflow包,若是没有报错,则安装成功,不然就有问题。变量