在 Conda 环境中安装包,但仅适用于 Python 而不是 iPython?
Installing a package in Conda environment, but only works in Python not iPython?
我正在使用 Ubuntu docker 图片。我已经在上面安装了 Anaconda,没有任何问题。我没有尝试使用 tensorflow 网站上的说明安装 tensorflow:
conda create --name tensorflow python=3.5
source activate tensorflow
<tensorflow> conda install -c conda-forge tensorflow
安装没有错误。但是,当我在 iPython
中导入时,它告诉我没有模块 tensorflow
。但是如果我在 Python
时导入,它工作正常。
这是怎么回事,我该如何解决?
你得在conda环境下安装IPython
source activate tensorflow
conda install ipython
我也经历过同样的事情。我们正在不同的 conda 环境中安装 tensorflow。所以它可能不包含所有包。我需要单独安装 jupyter notebook 才能工作。
我正在使用 Ubuntu docker 图片。我已经在上面安装了 Anaconda,没有任何问题。我没有尝试使用 tensorflow 网站上的说明安装 tensorflow:
conda create --name tensorflow python=3.5
source activate tensorflow
<tensorflow> conda install -c conda-forge tensorflow
安装没有错误。但是,当我在 iPython
中导入时,它告诉我没有模块 tensorflow
。但是如果我在 Python
时导入,它工作正常。
这是怎么回事,我该如何解决?
你得在conda环境下安装IPython
source activate tensorflow
conda install ipython
我也经历过同样的事情。我们正在不同的 conda 环境中安装 tensorflow。所以它可能不包含所有包。我需要单独安装 jupyter notebook 才能工作。