TensorFlow (any version > 2.5.0) on M1 Mac: No code completion in PyCharm
I am using JetBrain's PyCharm IDE to work with TensorFlow on a M1 Mac machine.
I have installed TensorFlow using the following commands in the given order:
conda create -n data-science -y python=3.9
conda activate data-science
conda install -c apple tensorflow-deps
pip install tensorflow-macos
pip install tensorflow-metal
For installing Conda, I followed Apple's official documentation at https://developer.apple.com/metal/tensorflow-plugin/
I can import TensorFlow without problems; the version number it prints is `2.8.0`.
However, I am not getting any code completion suggestions.
When typing `tensorflow.keras.l`, it should suggest `layers`, or `losses`.
As the attached screenshot shows, I am not getting anything usable:

I have restarted the IDE, invalidated any caches, re-indexed the project, and re-created the environment from scratch multiple times, all to no avail. Other suggestions are working as expected (such as the `os.path.join` line in the screenshot). What puzzles me is that, in another project on the very same machine (M1 Mac), I am using TensorFlow `2.5.0`, which gives me the desired code suggestions.
The inability to get code suggestion for more recent TensorFlow versions has stopped me from updating to, e.g., version `2.8.0`. What are your suggestions to solve this issue?
Please sign in to leave a comment.
Unfortunately, this is a known issue that we haven't addressed yet https://youtrack.jetbrains.com/issue/PY-50318, please vote for it to help us better prioritize it and feel free to comment.
Thanks for the tip, and apologies for not seeing it. My question can be closed.