ModuleNotFoundError:Windows 10没有名为'tensorflow'的模块

时间:2019-01-09 13:30:49

标签: python tensorflow

我正在使用Windows 10和Python 3.6.0

我尝试使用以下方式安装tensorflow:

Page extends Component {
 constructor(props) {
 super(props);

 this.state = { loading: true };
}

componentWillReceiveProps(nextProps){
 this.setState({ loading: true });
 setTimeout(() => {
   this.setState({ loading: false });
 }, 1000);
}

render() {
  return this.state.loading ? (
     <h1>Loading...</h1>
     ) : (
     <h1>{this.props.match.params.pagename}</h1>
  );
 }
}

然后对其进行测试:

pip3 install --upgrade tensorflow

我尝试了一些在线找到的解决方案,但没有成功。 同样通过C:\Windows\system32>python Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'tensorflow' 我得到:

  • 张量板1.12.1
  • tensorflow 1.12.0

pip list中也没有tensorflow-gpu。

我尝试卸载tensorflow并安装tensorflow 1.10,但我没有得到:

C:\ Users \ a> python 在Win32上的Python 3.6.0(v3.6.0:41df79263a11,2016年12月23日,08:06:12)[MSC v.1900 64位(AMD64)] 输入“帮助”,“版权”,“信用”或“许可证”以获取更多信息。
 导入tensorflow
追溯(最近一次通话):   文件“”,第1行,在模块中
  
中的文件“ C:\ Users \ a \ AppData \ Local \ Programs \ Python \ Python36 \ lib \ site-packages \ tensorflow__init __。py”,第22行     从tensorflow.python import pywrap_tensorflow#pylint:disable = unused-import
  
第52行中的文件“ C:\ Users \ a \ AppData \ Local \ Programs \ Python \ Python36 \ lib \ site-packages \ tensorflow \ python__init __。py”     从tensorflow.core.framework.graph_pb2导入*
  文件“ C:\ Users \ a \ AppData \ Local \ Programs \ Python \ Python36 \ lib \ site-packages \ tensorflow \ core \ framework \ graph_pb2.py”,第6行,在
中     从google.protobuf导入描述符为_descriptor
  
中的文件“ C:\ Users \ a \ AppData \ Local \ Programs \ Python \ Python36 \ lib \ site-packages \ google \ protobuf \ descriptor.py”,第47行     从google.protobuf.pyext导入_message
ImportError:DLL加载失败:可以解释的详细过程。

有什么想法吗?

0 个答案:

没有答案