本文介绍了在Windows 10上导入Tensorflow Python 3.7的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在计算机上导入tensorflow时遇到问题.最初收到错误后,我为wihndows-python 3.7重新安装了最新版本的Anaconda 5.3的Anaconda.对于安装,我在cmd上使用了以下命令:

I have issues with importing tensorflow on my computer.After I received errors initially, I reinstalled Anaconda with the newest version Anaconda 5.3 for wihndows - python 3.7 .For the installation I used the following commands on cmd:

  • conda install tensorflow-gpu-由于版本不同而出现错误,并继续执行以下操作:
  • conda create -n Tensorflow anaconda python=3.7-根据需要安装了一些软件包
  • activate Tensorflow
  • pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl->出现以下错误:tensorflow-1.1.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
  • conda install tensorflow-gpu - got an error because of different versions, and continued with the following:
  • conda create -n Tensorflow anaconda python=3.7 - installed some packages , as required
  • activate Tensorflow
  • pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl --> Got the following error : tensorflow-1.1.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

此后,无论如何我还是尝试将其导入jupyter笔记本上,并再次出现错误:

Afterwards I tried to import it on jupyter notebook anyway and got error again:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-64156d691fe5> in <module>()
----> 1 import tensorflow as tf

ModuleNotFoundError: No module named 'tensorflow'

谁能建议我该怎么解决?

Can anyone advise how can I solve it?

推荐答案

只需卸载python 3.7.xxxx版本,然后安装python 3.6.xx或更低版本,现在就可以成功运行pip install tensorflow.不要忘记重置ide的python路径并重新安装其他软件包.

just uninstall your python 3.7.xxxx versions,then install python 3.6.xx or lower version,now you can run pip install tensorflow successfully.don't forget reset your ide's python path and reinstall other packages.

这篇关于在Windows 10上导入Tensorflow Python 3.7的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 11:28