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 ImportError:DLL加载失败:动态链接库(DLL)初始化例程失败。而导入张量流_Python_Tensorflow_Tensorflow2.x - Fatal编程技术网

Python ImportError:DLL加载失败:动态链接库(DLL)初始化例程失败。而导入张量流

Python ImportError:DLL加载失败:动态链接库(DLL)初始化例程失败。而导入张量流,python,tensorflow,tensorflow2.x,Python,Tensorflow,Tensorflow2.x,导入TensorFlow时出现此错误。安装成功 CPU:IntelR XeonR CPU E5-2670 v3@2.30GHz 操作系统:Windows server 2016 python:3.7.6 TensorwFlow:2.3.0和2.2.0都给出了相同的错误 检查参数: 安装微软Visual C++可重新分配VisualStudio 2015, 2017和2019 存在msvcp140_1.dll AVX已启用 TensorFlow 2.0.0已在该系统上运行 此服务器没有inter

导入TensorFlow时出现此错误。安装成功

CPU:IntelR XeonR CPU E5-2670 v3@2.30GHz

操作系统:Windows server 2016

python:3.7.6

TensorwFlow:2.3.0和2.2.0都给出了相同的错误

检查参数:

安装微软Visual C++可重新分配VisualStudio 2015, 2017和2019

存在msvcp140_1.dll

AVX已启用

TensorFlow 2.0.0已在该系统上运行

此服务器没有internet访问权限,因此为了升级Tensorflow,我尝试了两种方法

在本地计算机和复制并运行环境中创建conda环境包

在本地计算机中使用pip下载.whl文件,并将其安装在远程服务器上

通过这两种方式,我都能够成功安装TensorFlow,但在导入时会出现此错误

请建议如何将TensorFlow 2.0.0升级到2.3.0

(devenv) C:\Users\parth.shah01\Desktop\devenv\Scripts>python
Python 3.7.0 | packaged by conda-forge | (default, Nov 12 2018, 20:47:31) [MSC v.1900 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
  File "C:\Users\parth.shah01\Desktop\devenv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\parth.shah01\Desktop\devenv\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\parth.shah01\Desktop\devenv\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "C:\Users\parth.shah01\Desktop\devenv\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
    from tensorflow.python import pywrap_tfe
  File "C:\Users\parth.shah01\Desktop\devenv\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\parth.shah01\Desktop\devenv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\parth.shah01\Desktop\devenv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.