Generating a PNG with matplotlib when DISPLAY is undefined

前端 未结 12 1241
感动是毒
感动是毒 2020-11-22 02:51

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         


        
12条回答
  •  你的背包
    2020-11-22 02:59

    When signing into the server to execute the code use this instead:

    ssh -X username@servername
    

    the -X will get rid of the no display name and no $DISPLAY environment variable error

    :)

提交回复
热议问题