No module named tensor flow — iPython notebook

后端 未结 6 1523
小鲜肉
小鲜肉 2020-12-21 03:09

I understand this may be an old question, but still I cannot find solution from off-the-shelf Q$A. Here is the problem:

I am following Udacity \"Mac

相关标签:
6条回答
  • 2020-12-21 03:18

    More than likely either Tensorflow is not installed in the right Python environment of Conda or not installed at all. Follow the below steps:

    $ conda create -n tensorflow python=3.5
    

    Once that is done, need to activate that as below:

    $ source activate tensorflow
    

    Then when you open IPython Notebook or Spyder, it will recognize the Tensorflow.

    0 讨论(0)
  • 2020-12-21 03:20

    i have missed tensorflow install (3) number below the list.. now i have solved

    1. for anaconda install

    2. for enviroment install https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#anaconda-installation

    3. for tensorflow install https://github.com/conda-forge/tensorflow-feedstock

    0 讨论(0)
  • 2020-12-21 03:29

    This is likely due to an anemic environment variable, one of the library path class. I don't know how iPythonNotebook denotes the libraries it will search for files (say, $LD_LIBRARY_PATH), but I believe that you have to find it (a list of paths to libraries) and add the root directory of TensorFlow.

    0 讨论(0)
  • 2020-12-21 03:31

    You should deactivate and re-activate the environment

    source deactivate tensorflow
    source activate tensorflow
    
    0 讨论(0)
  • 2020-12-21 03:33

    Run python -m ipykernel install --user --name <Environment_Name>. This should add your environment to the jupyter kernel list.

    Change the kernel using Kernel->Change Kernel option or New-><Environment_Name>.

    0 讨论(0)
  • 2020-12-21 03:36

    After I tried Anaconda-installation (I was using the other installation methods, which are all shown in the link below) https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#anaconda-installation It worked ...

    Further, on terminal activate tensorflow

    >>> source activate tensorflow
    

    before open iPython Notebook

    >>> ipython notebook
    

    At last, I have to restart my macbook to make it work....

    0 讨论(0)
提交回复
热议问题