TensorFlow installed on your cluster.
When you try to import
TensorFlow, it fails with an
Invalid Syntax or
The version of
protobuf installed on your cluster is not compatible with your version of
Use a cluster-scoped init script to install
TensorFlow with matching versions of
Create the init script.
dbutils.fs.put("/databricks/<init-script-folder>/install-tensorflow.sh",""" #!/bin/bash set -e /databricks/python/bin/python -V /databricks/python/bin/pip install tensorflow protobuf==3.17.3 numpy==1.15.0 """, True)
Install the init script that you just created as a cluster-scoped init script.
You will need the full path to the location of the script (
Restart the cluster after you have installed the init script.
Uninstall all existing versions of
NumPy before installing the init script on your cluster.