操作系统:MacOS Monterey 12.6.5
编程环境:conda create -n tf python=3.9
错误描述:导入 TensorFlow GPU 时,键入“import tensorflow as tf
”后出现
AttributeError: partially initialized module ‘charset_normalizer’ has
no attribute ‘md__mypyc’ (most likely due to a circular import)
修复方法:
pip install --force-reinstall charset-normalizer==3.1.0
修复结果:
[>>>tf.version
‘2.10.0’