2

When trying to run a program on JupyterLab within an OpenVino environment on my Raspberry Pi 4, I get the following error when I try to import Tensorflow:

ImportError: cannot import name 'context' from 'tensorflow.python.eager' (unknown location)

This program was having no issue importing anything just the other day, so I don't know what went wrong, nor how to remedy this issue.

Other pertinent information is that I'm running Python 3.7 and Tensorflow 2.3

Any help with this is appreciated.

  • 1
    Are you running jupyterlab in the same virtual environment where tensorflow is installed? – DrSpill Oct 18 '20 at 04:31
  • DrSpill, thanks for replying. Yes, I am pretty sure they are in the same environment. What makes this so confounding is that this sd card is a 64gb clone of a 32gb sd card. All the files and environments are the same. However, on the 32gb card, everything works perfectly. There is no error importing Tensorflow. There is only an error on the 64gb card I'm trying to use now. – Sam Skinner Oct 18 '20 at 05:52
  • Does [this](https://stackoverflow.com/questions/62787056/) answer your question ? –  Oct 18 '20 at 15:19

1 Answers1

0

Well I ended up resolving this issue. Turns out it was due to an issue in the cloning process. Created a new backup and restored from this new backup and the error went away.

Thanks for the help everyone.