这是indexloc提供的服务,不要输入任何密码
Skip to content

Tensorflow 2.19 fails to load after Pyside6 #97058

@civilwargeeky

Description

@civilwargeeky

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

binary

TensorFlow version

tf 2.19.0

Custom code

No

OS platform and distribution

Windows 11

Mobile device

No response

Python version

3.10.8

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

Specific Version: v2.19.0-rc0-6-ge36baa30292 2.19.0 (installed through pip)

When I call import tensorflow as tf; from PySide6 import QtCore, both modules import correctly, however, from PySide6 import QtCore; import tensorflow as tf fails with the error below.

My version of Pyside6 is 6.7.2

Standalone code to reproduce the issue

import tensorflow as tf 
from PySide6 import QtCore

Relevant log output

Traceback (most recent call last):
  File "c:\Users\xx\.conda\envs\formulator_prod\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 73, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: A dynamic link library (DLL) initialization routine failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "V:\yy\src\main.py", line 4, in <module>
    import tensorflow as tf
  File "c:\Users\xx\.conda\envs\formulator_prod\lib\site-packages\tensorflow\__init__.py", line 40, in <module>
    from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow  # pylint: disable=unused-import
  File "c:\Users\xx\.conda\envs\formulator_prod\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 88, in <module>
    raise ImportError(
ImportError: Traceback (most recent call last):
  File "c:\Users\xx\.conda\envs\formulator_prod\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 73, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 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 causes and solutions.
If you need help, create an issue at https://github.com/tensorflow/tensorflow/issues and include the entire stack trace above this error message.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions