I tried to configure TensorFlow on Mac OS and Win11 but it ran with errors:
2024-05-21 11:36:56.169279: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-21 11:36:56.584641: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
WARNING:tensorflow:From D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\internal\backend\numpy\_utils.py:48: The name tf.logging.TaskLevelStatusMessage is deprecated. Please use tf.compat.v1.logging.TaskLevelStatusMessage instead.
WARNING:tensorflow:From D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\internal\backend\numpy\_utils.py:48: The name tf.control_flow_v2_enabled is deprecated. Please use tf.compat.v1.control_flow_v2_enabled instead.
Traceback (most recent call last):
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\train.py", line 11, in <module>
from tf_agents.environments import tf_py_environment
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tf_agents\__init__.py", line 74, in <module>
from tf_agents import agents
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tf_agents\agents\__init__.py", line 17, in <module>
from tf_agents.agents import behavioral_cloning
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tf_agents\agents\behavioral_cloning\__init__.py", line 17, in <module>
from tf_agents.agents.behavioral_cloning import behavioral_cloning_agent
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tf_agents\agents\behavioral_cloning\behavioral_cloning_agent.py", line 37, in <module>
import tensorflow_probability as tfp
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\__init__.py", line 20, in <module>
from tensorflow_probability import substrates
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\substrates\__init__.py", line 17, in <module>
from tensorflow_probability.python.internal import all_util
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\__init__.py", line 138, in <module>
dir(globals()[pkg_name]) # Forces loading the package from its lazy loader.
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\internal\lazy_loader.py", line 57, in __dir__
module = self._load()
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\internal\lazy_loader.py", line 40, in _load
module = importlib.import_module(self.__name__)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\experimental\__init__.py", line 31, in <module>
from tensorflow_probability.python.experimental import bayesopt
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\experimental\bayesopt\__init__.py", line 17, in <module>
from tensorflow_probability.python.experimental.bayesopt import acquisition
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\experimental\bayesopt\acquisition\__init__.py", line 19, in <module>
from tensorflow_probability.python.experimental.bayesopt.acquisition.expected_improvement import GaussianProcessExpectedImprovement
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\experimental\bayesopt\acquisition\expected_improvement.py", line 19, in <module>
from tensorflow_probability.python.distributions import normal
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\distributions\__init__.py", line 110, in <module>
from tensorflow_probability.python.distributions.pixel_cnn import PixelCNN
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\distributions\pixel_cnn.py", line 33, in <module>
from tensorflow_probability.python.layers import weight_norm
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\layers\__init__.py", line 27, in <module>
from tensorflow_probability.python.layers.distribution_layer import CategoricalMixtureOfOneHotCategorical
File "D:\Users\ethan\LocalFiles\CodesFile\economics\Reducing-Systemic-Risk-with-DDPG\.venv\lib\site-packages\tensorflow_probability\python\layers\distribution_layer.py", line 68, in <module>
tf.keras.__internal__.utils.register_symbolic_tensor_type(dtc._TensorCoercible) # pylint: disable=protected-access
AttributeError: module 'keras._tf_keras.keras' has no attribute '__internal__'
I tried several environmental configurations and nothing worked. So I want to ask you what kind of environment configuration is it?
This is my Python 3.9 virtual environment configuration:
I tried to configure TensorFlow on Mac OS and Win11 but it ran with errors:
I tried several environmental configurations and nothing worked. So I want to ask you what kind of environment configuration is it?
This is my Python 3.9 virtual environment configuration: