(tensorflow2) C:\Users\asus>python Python 3.9.19 (main, May 62024, 20:12:36) [MSC v.191664 bit (AMD64)] on win32 Type"help", "copyright", "credits"or"license"for more information. >>> import tensorflow as tf Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\__init__.py", line 41, in <module> from tensorflow.python.tools import module_util as _module_util File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\__init__.py", line 41, in <module> from tensorflow.python.eager import context File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\eager\context.py", line 33, in <module> from tensorflow.core.framework import function_pb2 File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\core\framework\function_pb2.py", line 16, in <module> from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2 File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\core\framework\attr_value_pb2.py", line 16, in <module> from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2 File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\core\framework\tensor_pb2.py", line 16, in <module> from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2 File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\core\framework\resource_handle_pb2.py", line 16, in <module> from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2 File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\core\framework\tensor_shape_pb2.py", line 36, in <module> _descriptor.FieldDescriptor( File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\google\protobuf\descriptor.py", line 553, in __new__ _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. 2.Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates >>>
(tensorflow2) C:\Users\asus>python Python 3.9.19 (main, May 62024, 20:12:36) [MSC v.191664 bit (AMD64)] on win32 Type"help", "copyright", "credits"or"license"for more information. >>> import tensorflow as tf
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0as it may crash. To support both 1.x and2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2'ortry to upgrade the affected module. We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\__init__.py", line 41, in <module> from tensorflow.python.tools import module_util as _module_util File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\__init__.py", line 41, in <module> from tensorflow.python.eager import context File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\eager\context.py", line 38, in <module> from tensorflow.python.client import pywrap_tf_session File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\client\pywrap_tf_session.py", line 23, in <module> from tensorflow.python.client._pywrap_tf_session import * AttributeError: _ARRAY_API not found
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0as it may crash. To support both 1.x and2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2'ortry to upgrade the affected module. We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\__init__.py", line 41, in <module> from tensorflow.python.tools import module_util as _module_util File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\__init__.py", line 46, in <module> from tensorflow.python import data File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\__init__.py", line 25, in <module> from tensorflow.python.data import experimental File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\experimental\__init__.py", line 98, in <module> from tensorflow.python.data.experimental import service File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\experimental\service\__init__.py", line 374, in <module> from tensorflow.python.data.experimental.ops.data_service_ops import distribute File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\experimental\ops\data_service_ops.py", line 27, in <module> from tensorflow.python.data.experimental.ops import compression_ops File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\experimental\ops\compression_ops.py", line 20, in <module> from tensorflow.python.data.util import structure File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\util\structure.py", line 26, in <module> from tensorflow.python.data.util import nest File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\util\nest.py", line 40, in <module> from tensorflow.python.framework import sparse_tensor as _sparse_tensor File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\framework\sparse_tensor.py", line 28, in <module> from tensorflow.python.framework import constant_op File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\framework\constant_op.py", line 29, in <module> from tensorflow.python.eager import execute File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\eager\execute.py", line 27, in <module> from tensorflow.python.framework import dtypes File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\framework\dtypes.py", line 30, in <module> from tensorflow.python.lib.core import _pywrap_bfloat16 AttributeError: _ARRAY_API not found ImportError: numpy.core._multiarray_umath failed to import ImportError: numpy.core.umath failed to import Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\__init__.py", line 41, in <module> from tensorflow.python.tools import module_util as _module_util File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\__init__.py", line 46, in <module> from tensorflow.python import data File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\__init__.py", line 25, in <module> from tensorflow.python.data import experimental File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\experimental\__init__.py", line 98, in <module> from tensorflow.python.data.experimental import service File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\experimental\service\__init__.py", line 374, in <module> from tensorflow.python.data.experimental.ops.data_service_ops import distribute File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\experimental\ops\data_service_ops.py", line 27, in <module> from tensorflow.python.data.experimental.ops import compression_ops File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\experimental\ops\compression_ops.py", line 20, in <module> from tensorflow.python.data.util import structure File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\util\structure.py", line 26, in <module> from tensorflow.python.data.util import nest File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\data\util\nest.py", line 40, in <module> from tensorflow.python.framework import sparse_tensor as _sparse_tensor File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\framework\sparse_tensor.py", line 28, in <module> from tensorflow.python.framework import constant_op File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\framework\constant_op.py", line 29, in <module> from tensorflow.python.eager import execute File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\eager\execute.py", line 27, in <module> from tensorflow.python.framework import dtypes File "C:\Users\asus\.conda\envs\tensorflow2\lib\site-packages\tensorflow\python\framework\dtypes.py", line 33, in <module> _np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle >>>
2.7.0 /device:GPU:0 <function set_visible_devices at 0x0000024D19BB4D30> GPU: [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')] CPU: [PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU')] [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')] WARNING:tensorflow:From c:\users\86180\.spyder-py3\temp.py:9: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version. Instructions for updating: Use `tf.config.list_physical_devices('GPU')` instead. True Num GPUs Available: 1