安装TensorFlow后 import tensorflow 报错
2017-12-19 20:01
666 查看
安装TensorFlow后
import tensorflow
提示以下错误:(解决方法在最后)
tensorflow安装成功,import tensorflow时出错。
ImportError: DLL load failed: 内存位置访问无效。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-p
ackages\tensorflow\python\__init__.py", line 66, in <module>
from tensorflow.python import pywrap_tensorflow
File "D:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-p
ackages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
_pywrap_tensorflow = swig_import_helper()
File "D:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-p
ackages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow')
File "D:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\import
lib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'
解决方法:我安装的TensorFlow版本是tensorflow_gpu-1.1.0-cp35-cp35m-win_amd64.whl(即:TensorFlow1.1 Python3.5 Windows64位)
将版本改为cuda8.0+cudnn8.0即可正常导入。
ps:至于为什么要用这个版本我也不知道,开始的时候我用的cuda8.0+cudnn6.0就老是报上面的错
import tensorflow
提示以下错误:(解决方法在最后)
tensorflow安装成功,import tensorflow时出错。
ImportError: DLL load failed: 内存位置访问无效。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-p
ackages\tensorflow\python\__init__.py", line 66, in <module>
from tensorflow.python import pywrap_tensorflow
File "D:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-p
ackages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
_pywrap_tensorflow = swig_import_helper()
File "D:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-p
ackages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
return importlib.import_module('_pywrap_tensorflow')
File "D:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\import
lib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'
解决方法:我安装的TensorFlow版本是tensorflow_gpu-1.1.0-cp35-cp35m-win_amd64.whl(即:TensorFlow1.1 Python3.5 Windows64位)
将版本改为cuda8.0+cudnn8.0即可正常导入。
ps:至于为什么要用这个版本我也不知道,开始的时候我用的cuda8.0+cudnn6.0就老是报上面的错
相关文章推荐
- tensorflow windows安装 Error import tensorflow错误解决方法
- windows 下安装tensorflow报错,pywrap_tensorflow.py in swig_import_helper
- Centos6安装TensorFlow及TensorFlowOnSpark
- Tensorflow-1-Tensorflow Moblie Android平台编译安装
- ubuntu下的tensorflow安装:cuda8.0+cudnn5.0+opencv2.4.11+anaconda+tensorflow
- Tensorflow+cuda+cudnn+window+Python之window下安装TensorFlow
- 【tensorTensorFlow学习笔记】Mac+Linux虚拟机安装TensorFlow
- Ubuntu14.04LTS下安装tensorflow(Anaconda3+pycharm+tensorflow+CPU)
- 8-17 安装tensorflow-gpu使用豆瓣源安装比较快 pip install tensorflow-gpu -i http://pypi.douban.com/simple
- Window10 + tensorflow 安装(解决Error importing tensorflow, unless you are using bazel...)
- tensorFlow解决问题ImportError: No module named 'tensorflow.python.pywrap_tensorflow_internal'
- Ubuntu16.04下安装tensorflow(Anaconda3+pycharm+tensorflow+CPU)
- tensorflow安装出现Failed to load the native TensorFlow runtime问题
- Tensorflow安装问题: Could not find a version that satisfies the requirement tensorflow
- windows安装TensorFlow gpu版本时候的bug;No module named "_pywrap_tensorflow" ;DLL load failed.
- 【Python】记录五:使用anaconda安装Tensorflow+在spyder和jupyter中启动Tensorflow
- tensorflow_cookbook:Ch 1: Getting Started with TensorFlow(8)08_Additional_Resources
- windows jupyter 无法import tensorflow
- Ubuntu Windows双系统安装 anaconda tensorflow安装