ImportError: cannot import name 'context'

this is my final task on college and i’m new to python… my coding is about emotion recognition with fer library. i had installed all of required library. this is my code

import os
import sys

import matplotlib
if == 'posix' and "DISPLAY" not in os.environ:

import matplotlib.pyplot as plt

from fer.fer import FER
from fer import Video
import cv2

if _name_ == "_main_":
        videofile = sys.argv[1]
        videofile = "test.mp4"
    detector = FER(mtcnn=True)
    video = Video(videofile)

    # Output list of dictionaries
    raw_data = video.analyze(detector, display=False)

    # Convert to pandas for analysis
    df = video.to_pandas(raw_data)
    df = video.get_first_face(df)
    df = video.get_emotions(df)

    # Plot emotions

and i got this error :

Using TensorFlow backend.
Traceback (most recent call last):
  File "", line 12, in <module>
    from fer.fer import FER
  File "/home/jn-a02/.local/lib/python3.6/site-packages/fer/", line 38, in <module>
    from keras.models import load_model
  File "/home/jn-a02/.local/lib/python3.6/site-packages/keras/", line 3, in <module>
    from . import utils
  File "/home/jn-a02/.local/lib/python3.6/site-packages/keras/utils/", line 6, in <module>
    from . import conv_utils
  File "/home/jn-a02/.local/lib/python3.6/site-packages/keras/utils/", line 9, in <module>
    from .. import backend as K
  File "/home/jn-a02/.local/lib/python3.6/site-packages/keras/backend/", line 1, in <module>
    from .load_backend import epsilon
  File "/home/jn-a02/.local/lib/python3.6/site-packages/keras/backend/", line 90, in <module>
    from .tensorflow_backend import *
  File "/home/jn-a02/.local/lib/python3.6/site-packages/keras/backend/", line 6, in <module>
    from tensorflow.python.eager import context
ImportError: cannot import name 'context'

I’m using Nvidia Jetson Nano A02, I’m pretty new to programming so I don’t know about this error. Can any one recommend what can I do to resolve it? Thanks

This looks like a Jetson issue. We recommend you to raise it to the respective platform from the below link


okay, sorry my fault