[英]Use GPU installation of tensorflow/cuda in spyder under ubuntu 14.04
I am running ubuntu 14.04 with an anaconda2 installation and would like to use tensorflow in combination with CUDA. 我正在使用anaconda2安装运行ubuntu 14.04,并希望将tensorflow与CUDA结合使用。 So far the steps I performed are: 到目前为止,我执行的步骤是:
Now if I start python or IDLE from the terminal, I can import tensorflow and it will find all the CUDA dependencies, great! 现在,如果我从终端启动python或IDLE,我可以导入tensorflow,它会找到所有CUDA依赖项,太棒了!
...however, if I start ipython or spyder from the same terminal, running "import tensorflow as tf" gives me a cold-hearted "ImportError: No module named tensorflow". ...但是,如果我从同一个终端启动ipython或spyder,运行“import tensorflow as tf”会让我感到冷漠“ImportError:没有名为tensorflow的模块”。
My question: How can I get ipython and spyder to find the tensorflow library just like in an IDLE and a python instance? 我的问题:我怎样才能让ipython和spyder像IDLE和python实例一样找到tensorflow库?
To solve your issue you have 3 options here: 要解决您的问题,您有3个选项:
1 just start spyder from terminal 1从终端开始spyder
2 move PATH variable definition from .bash_profile to session init scripts 2将PATH变量定义从.bash_profile移动到会话初始化脚本
3 Duplicate your PATH in spyder's run configuration 3在spyder的运行配置中复制PATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.