From the question, I understand that you are trying to use a TensorFlow 2.6 Python 3.8 kernel in SageMaker Studio, but you are unable to import tensorflow.
The service team are aware of this issue and are actively working on a fix.
A) If your use case is version flexible, version other than 2.6 should work.
B) If not, you can try the following as workaround
- Open a notebook using a Tensorflow 2.6 Python 3.8 kernel
- Execute the following line in a notebook cell: !sed -i 's|^ *"python",| "/usr/local/bin/python",|g' /usr/local/share/jupyter/kernels/python3/kernel.json
- Stop the kernel
- Re-attach the kernel to your notebook.
Hope it helps!
Sagemaker Studio notebook - no module named 'tensorflow' when chosen image type "Tensorflow 2.6 Python 3.8 GPU optimized"Accepted Answerasked 9 months ago
Attaching custom image to user (not domain) in SageMaker StudioAccepted Answerasked 2 years ago
Installation of jupyter notebook on Deep Learning AMI GPU TensorFlow 2.9.1 (Amazon Linux 2)asked 2 months ago
How to tune SageMaker Studio Notebooks hardware config?Accepted AnswerEXPERTasked 3 years ago
Is there a solution for multi-user Notebook on SageMaker?Accepted AnswerEXPERTasked 2 years ago
Sagemaker Studio notebook instances restricted to 64 megabytes not allow to train Pytorch multiprocessasked 8 months ago
Jupyter Notebookasked a month ago
GPU not detected by tensorflow in SM Studioasked a year ago
Sagemaker Jupyter Studio Notebook public sharingAccepted Answerasked 3 months ago
Notebook Instance Types for SageMaker StudioAccepted AnswerEXPERTasked 2 years ago