Ubuntu上的Tensorflow和Anaconda吗? [英] Tensorflow and Anaconda on Ubuntu?
问题描述
在我的Ubuntu 14.04上,我已按照 Tensorflow安装说明中的指定,使用"pip"安装了tensorflow. ,我通过将其导入python来确保它可以正常工作.
On my Ubuntu 14.04, I have installed tensorflow, using "pip", as specified in the Tensorflow Installation instructions and I made sure it was working by importing it in python and it did work.
然后,我安装了Anaconda,并通过在其中添加以下行来更改了.bashrc文件:
Then, I installed Anaconda and it changed my .bashrc file by adding the following line to it:
export PATH="/home/sonny/anaconda2/bin:$PATH"
但是由于此更改,现在它查找上面的PATH,其中不包含tensorflow.现在我无法在我的python代码中导入tensorflow.
But because of this change, now it looks into the PATH above, which doesn't contain tensorflow. now I can't import tensorflow in my python code.
扩展$ PATH环境变量的正确方法是什么,以使其保持使用anaconda2的所有内容,但可以导入"tensorflow"?
What is the proper way to extend the $PATH environment variable so that it stays using everything from anaconda2 but it becomes able to import "tensorflow"?
推荐答案
我以不同的方式解决了这个问题! 我找到了一个将tensorflow.whl文件转换为conda软件包的链接,所以我继续使用以下命令进行安装:
I solved the problem but in a different way! I found a link where the tensorflow.whl files were converted to conda packages, so I went ahead and installed it using the command:
conda install -c https://conda.anaconda.org/jjhelmus tensorflow
它成功了,因为$ PATH指向anaconda包,所以我现在就可以导入它!
and it worked, since the $PATH points to anaconda packages, I can import it now!
这篇关于Ubuntu上的Tensorflow和Anaconda吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!