Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

in python3 draw() function displays no graphic window

More
11 months 3 weeks ago - 11 months 3 weeks ago #4778 by h.sterner
Hi erverybody
I am new in Netgen/NGSolve. My first step was running the poisson.py example, but no graphic will be displayed.
The script simply ends without any error messege.
I use ubuntu 22.10 and python3. The installation runs without any error message. I also installed jupyter-notebook and extensions accordin the install instruchtions 
can anyone help me?
 
Last edit: 11 months 3 weeks ago by h.sterner.
More
11 months 3 weeks ago - 11 months 3 weeks ago #4789 by christopher
Try running the script either with the installed netgen executable or with
Code:
python -m netgen poisson.py
Last edit: 11 months 3 weeks ago by christopher.
More
11 months 2 weeks ago - 11 months 2 weeks ago #4808 by h.sterner
Hello Christopher
Thank you for your helpful hint
variant “netgen poisson.py” works
variant “python3 -m netgen poisson.py” works too
But with jupyter-notebook the Draw() function works also
The problem occurs only in pure python3
Actually, I have no problem with tat, I simply use the -m netgen variantmany Thanks
Hermann
Last edit: 11 months 2 weeks ago by h.sterner.
More
11 months 2 weeks ago #4809 by joachim
alternatively, you can add

import netgen.gui

into the python file, and something like
input("press return key")
at the end.

Joachim
More
11 months 2 weeks ago #4818 by h.sterner
The GUI works fine now
I feel like a child on a playground...
Many Thanks
Hermann
Time to create page: 0.154 seconds