如何在 spyder 上使用 tensorflow? [英] How to use tensorflow on spyder?

查看:83
本文介绍了如何在 spyder 上使用 tensorflow?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Python 的新用户,想使用 tensorflow.我想我通过 Anaconda 在我的 mac OSX 上成功安装了 tensorflow.但是我仍然无法弄清楚如何在 Spyder 上使用 tensorflow.有人可以帮助我吗?非常感谢!

I am a new users for Python and want to use tensorflow. I think I successfully installed tensorflow on my mac OSX via Anaconda. But I still can't figure out how to use tensorflow on Spyder. Could someone help me? Many thanks!

推荐答案

系统默认 python 可能在命令行上使用,首先验证您使用的是 anaconda 发行版的 python.首先设置环境变量.

System default python maybe used on command line, first verify that you are using the python from anaconda distro. Set up the environment variables first.

如果您没有构建具有 GPU 支持的 tensorflow.您可以在一个命令中通过 conda 安装 tensorflow.

If you are not building tensorflow with GPU support. you can install tensorflow through conda in one command.

$ conda install -c https://conda.anaconda.org/jjhelmus tensorflow

$ conda install -c https://conda.anaconda.org/jjhelmus tensorflow

在 Spyder 中:将 tensorflow 导入为 tf.一切顺利.

in Spyder: import tensorflow as tf. and you're good to go.

这篇关于如何在 spyder 上使用 tensorflow?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆