No module named tensorflow in jupyter

后端 未结 13 1242
梦如初夏
梦如初夏 2020-12-04 18:06

I have some imports in my jupyter notebook and among them is tensorflow:

ImportError                               Traceback (most recent call last)


        
13条回答
  •  失恋的感觉
    2020-12-04 18:42

    As suggested by @Jörg, if you have more than one kernel spec. You have to see the path it points to. In my case, it is actually the path that was to be corrected.

    When I created TensorFlow virtual env, the spec had the entry for python which was pointing to base env. Thus by changing W:\\miniconda\\python.exe to W:\\miniconda\\envs\\tensorflow\\python.exe solved the problem.

    So it is worth looking at your kernel spec. Delete that is not needed and keep those you want. Then look inside the JSON files where the path is given and change if needs be. I hope it helps.

提交回复
热议问题