Forums

Problem with $DISPLAY

Dear all,

I'm trying to run a Python Code but I get the error below:

Unable to access the X Display, is $DISPLAY set properly?

Do you know how to fix that?

Thanks

What are you trying to run on PythonAnywhere? Remember, there is no X Windows display.

+! to what rcs1000 said. What's the program you're trying to run?

I uploaded the file and tried to run through the Bash Console. But you're right, there is no X Windows Display. My objective was to plot a 3d surface with the mesh command and then rotate the surface, simple stuff. How could I do that in Python Anywhere?

Hmm, that's going to be tricky with any web-based service -- you'll have to write new rendering code in JavaScript. Have you looked at WebGL? The Three.js framework (built on WebGL) is an awesome JS rendering library, which uses the viewer's computer's GPU, so it's pretty fast.