I am trying to use networkx with Python. When I run this program it get this error. Is there anything missing?
#!/usr/bin/env python import networkx as nx i
I got the error while using matplotlib through Spark. matplotlib.use('Agg') doesn't work for me. In the end, the following code works for me. More here
matplotlib.use('Agg')
import matplotlib.pyplot as plt. plt.switch_backend('agg')