PyCharm使用Anaconda新建的环境

首先,创建一个环境用来安装Tensorflow:

conda create -n tensorflow python=3.5.6

安装以后,在Anaconda Navigator可以看到已经增加了一个新环境:

在cmd窗口中输入:

conda activate tensorflow

安装Tensorflow的GPU版本:

pip install --upgrade --ignore-installed tensorflow--gpu

在PyCharm中,File->Settings->Projector Interpretor,在Projector Interpretor中Add,选择Virtualenv Environment,Existing Environment,选择C:\ProgramData\Anaconda3\envs\tensorflow\python.exe,再点击OK。

猜你喜欢

转载自www.cnblogs.com/mstk/p/9931837.html