MicrosoftDocs / mslearn_databricks

companion Databricks notebooks for Learn modules
Creative Commons Attribution 4.0 International
26 stars 25 forks source link

User Defined Functions Notebook returns: ModuleNotFoundError: No module named 'tensorflow' #5

Open mkrasmus opened 3 years ago

mkrasmus commented 3 years ago

First command

%run "./Includes/Classroom-Setup"

Returns:

ModuleNotFoundError: No module named 'tensorflow'
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped
Command skipped

Rest of the notebook executes fine

blatan12 commented 3 years ago

I had this issue also. I simply installed tensorflow first using "pip install --upgrade tensorflow"

Note that this also updated the version of python core which probably isn't perfect. So maybe take my suggestion with a grain of salt

blatan12 commented 3 years ago

I had this issue also. I simply installed tensorflow first using "pip install --upgrade tensorflow"

Note that this also updated the version of python core which probably isn't perfect. So maybe take my suggestion with a grain of salt

As an update, I worked out why this happened. I wasn't using the correct image for my DataBricks cluster. There are two versions of 7.3 LTS, one has an ML on it... that one obviously has more ML libraries preinstalled.