Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 加载张量流模块_Python 3.x_Tensorflow_Image Processing_Anaconda - Fatal编程技术网

Python 3.x 加载张量流模块

Python 3.x 加载张量流模块,python-3.x,tensorflow,image-processing,anaconda,Python 3.x,Tensorflow,Image Processing,Anaconda,我在导入tensorflow时遇到问题 以下是我最近的堆栈跟踪: (tensorflow) C:\Users\Vaidik>python Python 3.5.5 |Anaconda, Inc.| (default, Apr 7 2018, 04:52:34) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>

我在导入tensorflow时遇到问题

以下是我最近的堆栈跟踪:

(tensorflow) C:\Users\Vaidik>python
Python 3.5.5 |Anaconda, Inc.| (default, Apr  7 2018, 04:52:34) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "F:\Software\Anaconda\envs\tensorflow\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "F:\Software\Anaconda\envs\tensorflow\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 22, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "F:\Software\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "F:\Software\Anaconda\envs\tensorflow\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "F:\Software\Anaconda\envs\tensorflow\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
(tensorflow)C:\Users\Vaidik>python
win32上的Python 3.5.5 | Anaconda,Inc.|(默认值,2018年4月7日,04:52:34)[MSC v.1900 64位(AMD64)]
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>导入tensorflow作为tf
回溯(最近一次呼叫最后一次):
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\python\pywrap\u tensorflow.py”,第58行,在
从tensorflow.python.pywrap\u tensorflow\u内部导入*
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\python\pywrap\u tensorflow\u internal.py”,第28行,在
_pywrap\u tensorflow\u internal=swig\u import\u helper()
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\python\pywrap\u tensorflow\u internal.py”,第24行,在swig\u import\u helper中
_mod=imp.load_模块(“pywrap_tensorflow_internal”,fp,路径名,描述)
文件“F:\Software\Anaconda\envs\tensorflow\lib\imp.py”,第243行,在加载模块中
返回加载动态(名称、文件名、文件)
文件“F:\Software\Anaconda\envs\tensorflow\lib\imp.py”,第343行,在load\u dynamic中
返回负载(规格)
ImportError:DLL加载失败:找不到指定的模块。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\\uuuu init\uuuu.py”,第22行,在
从tensorflow.python导入pywrapu tensorflow 35; pylint:disable=未使用的导入
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\python\\uuu init\uuu.py”,第49行,在
从tensorflow.python导入pywrap\u tensorflow
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\python\pywrap\u tensorflow.py”,第74行,在
提高效率(msg)
ImportError:回溯(最近一次呼叫上次):
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\python\pywrap\u tensorflow.py”,第58行,在
从tensorflow.python.pywrap\u tensorflow\u内部导入*
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\python\pywrap\u tensorflow\u internal.py”,第28行,在
_pywrap\u tensorflow\u internal=swig\u import\u helper()
文件“F:\Software\Anaconda\envs\tensorflow\lib\site packages\tensorflow\python\pywrap\u tensorflow\u internal.py”,第24行,在swig\u import\u helper中
_mod=imp.load_模块(“pywrap_tensorflow_internal”,fp,路径名,描述)
文件“F:\Software\Anaconda\envs\tensorflow\lib\imp.py”,第243行,在加载模块中
返回加载动态(名称、文件名、文件)
文件“F:\Software\Anaconda\envs\tensorflow\lib\imp.py”,第343行,在load\u dynamic中
返回负载(规格)
ImportError:DLL加载失败:找不到指定的模块。
未能加载本机TensorFlow运行时。
看见https://www.tensorflow.org/install/install_sources#common_installation_problems
因为一些常见的原因和解决方案。包括整个堆栈跟踪
以上是请求帮助时的错误消息。
使用卸载tf

conda uninstall tensorflow
然后再安装一次

python3 -m pip install tensorflow==1.8.0 --user

请尝试为所需的python版本创建conda环境,并安装tensorflow

请按照以下步骤操作:

  • conda create-n tf35-c英特尔python=3.5 pip numpy

    (tf35是环境名称)

  • 激活tf35

  • conda安装-c anaconda tensorflow
  • 感谢

    一个简单的搜索查询“ImportError:DLL加载失败的tensorflow”导致。你看过那些吗?他们有没有让你接近解决这个问题?到目前为止你试过什么?请阅读。