ImportError: No module named tensorflow

前端 未结 18 2298
长情又很酷
长情又很酷 2020-11-28 05:11

Please help me with this error

I have installed the tensorflow module on my server and below is it\'s information

15IT60R19@cpusrv-gpu-109:~$ pip sho         


        
相关标签:
18条回答
  • 2020-11-28 05:49

    On my remote machine, I had TensorFlow installed via pip and when I was importing it in ipython the import was successful. Despite of that I still got the No module named tensorflow error when I was running my scripts. The issue here was that I was running my scripts with sudo, so the python and tensorflow paths were not visible to the root. When I ran my scripts without sudo, everything worked.

    0 讨论(0)
  • 2020-11-28 05:50

    You may need this since first one may not work.

    python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl

    0 讨论(0)
  • 2020-11-28 05:51

    For me, if I did

    python3 -m pip install tensorflow
    

    then I got the error the OP reports when using a 3rd party library calling tensorflow.

    However, when I substituted either tensorflow-cpu or tensorflow-gpu (depending upon which one is appropriate for you) then the code was suddenly able to find tensorflow.

    0 讨论(0)
  • 2020-11-28 05:53

    For Anaconda3, simply install in Anaconda Navigator:

    0 讨论(0)
  • 2020-11-28 05:55

    In my case, I install 32 Bit Python so I cannot install Tensorflow, After uninstall 32 Bit Python and install 64 Bit Python, I can install tensorflow successfully.

    After reinstall Python 64 bit, you need to check your python install folder path is properly set in Windows Environment Path.

    You can check Python version by typing python in cmd.

    0 讨论(0)
  • 2020-11-28 05:56

    Try installing tensorflow in the user site - This installation only works for you.

    pip install tensorflow --user

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