Importing Tensorflow gives this error
This is my "code":
import tensorflow as tf
My versions: protoc --version
libprotoc 3.15.8
pip show protobuf
Name: protobuf Version: 3.19.1
Tensorflow 2.6.0
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-64156d691fe5> in <module>
----> 1 import tensorflow as tf
~/miniforge3/envs/userenv/lib/python3.8/site-packages/tensorflow/__init__.py in <module>
39 import sys as _sys
40
---> 41 from tensorflow.python.tools import module_util as _module_util
42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
43
~/miniforge3/envs/userenv/lib/python3.8/site-packages/tensorflow/python/__init__.py in <module>
38 # pylint: disable=wildcard-import,g-bad-import-order,g-import-not-at-top
39
---> 40 from tensorflow.python.eager import context
41 from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
42
~/miniforge3/envs/userenv/lib/python3.8/site-packages/tensorflow/python/eager/context.py in <module>
30 import six
31
---> 32 from tensorflow.core.framework import function_pb2
33 from tensorflow.core.protobuf import config_pb2
34 from tensorflow.core.protobuf import rewriter_config_pb2
~/miniforge3/envs/userenv/lib/python3.8/site-packages/tensorflow/core/framework/function_pb2.py in <module>
3 # source: tensorflow/core/framework/function.proto
4 """Generated protocol buffer code."""
----> 5 from google.protobuf import descriptor as _descriptor
6 from google.protobuf import message as _message
7 from google.protobuf import reflection as _reflection
~/miniforge3/envs/userenv/lib/python3.8/site-packages/google/protobuf/descriptor.py in <module>
45 import binascii
46 import os
---> 47 from google.protobuf.pyext import _message
48 _USE_C_DESCRIPTORS = True
49
AttributeError: module 'google.protobuf.internal.containers' has no attribute 'MutableMapping'
I'm using Jupyter and am on a Apple M1. I use Miniforge, and I really have no clue where to look next. I switched from Anaconda to Miniforge because of the native M1 chip.