pyNastran GUI on MacOS

14 views
Skip to first unread message

Rob McDonald

unread,
Apr 17, 2025, 1:04:27 PMApr 17
to pyNastran Discuss
I'd like to use the pyNastran GUI on MacOS to inspect NASTRAN files generated with OpenVSP.

Unfortunately, I'm absolutely abysmal with Python and I don't seem to be able to make any progress.

For example:

% pip install pyNastran[gui_pyside2] -U
zsh: no matches found: pyNastran[gui_pyside2]


Following the 'install from source' instructions gives a similar result.  There doesn't appear to actually be any [gui] package.

The GUI download from SourceForge appears to only support Windows.

If/when I do get it installed, I don't even know how to run the GUI.  Even the GUI Quick Start doesn't actually tell me what to type in or click on to launch the GUI.

Any help is appreciated,

Rob

Steven Doyle

unread,
Apr 18, 2025, 1:33:21 AMApr 18
to pynastra...@googlegroups.com
Rob,

I don't think I've ever installed that way without using source. I honestly just use the whack-a-mole approach of:
>>> pip install pyNastran vtk imageio -U
>>> pip install pyside2 -U
It should work eventually :)

On the command line, type:
>>> pyNastranGUI
and it'll load

The full command is seen from "pyNastran --help" and is here: https://pynastran-git.readthedocs.io/en/latest/quick_start/gui.html
>>> pyNastranGUI --help

  Usage:
    pyNastranGUI [-f FORMAT] INPUT [-o OUTPUT]
                 [-s SHOT] [-m MAGNIFY]
                 [-g GSCRIPT] [-p PSCRIPT]
                 [-u POINTS_FNAME...] [--user_geom GEOM_FNAME...]
                 [-q] [--groups]
    pyNastranGUI [-f FORMAT] INPUT OUTPUT [-o OUTPUT]
                 [-s SHOT] [-m MAGNIFY]
                 [-g GSCRIPT] [-p PSCRIPT]
                 [-u POINTS_FNAME...] [--user_geom GEOM_FNAME...]
                 [-q] [--groups]
    pyNastranGUI [-f FORMAT] [-i INPUT] [-o OUTPUT...]
                 [-s SHOT] [-m MAGNIFY]
                 [-g GSCRIPT] [-p PSCRIPT]
                 [-u POINTS_FNAME...] [--user_geom GEOM_FNAME...]
                 [-q] [--groups]
    pyNastranGUI -h | --help
    pyNastranGUI -v | --version

  Primary Options:
    -f FORMAT, --format FORMAT  format type (avus, cart3d, lawgs, nastran, panair,
                                             plot3d, stl, surf, tetgen, ugrid, usm3d)
    -i INPUT, --input INPUT     path to input file
    -o OUTPUT, --output OUTPUT  path to output file

  Secondary Options:
    -g GSCRIPT, --geomscript        path to geometry script file (runs before load geometry)
    -p PSCRIPT, --postscript        path to post script file (runs after load geometry)
    -s SHOT, --shots SHOT           path to screenshot (only 1 for now)
    -m MAGNIFY, --magnify           how much should the resolution on a picture be magnified [default: 5]
    --groups                        enables groups
    --user_geom GEOM_FNAME          add user specified points to an alternate grid (repeatable)
    -u POINTS_FNAME, --user_points  add user specified points to an alternate grid (repeatable)

  Info:
    -q, --quiet    prints debug messages (default=True)
    -h, --help     show this help message and exit
    -v, --version  show program's version number and exit
 
The way I mostly call it is:
>>> pyNastranGUI fem.bdf
>>> pyNastranGUI fem.bdf fem.op2

If you use a dat file:
>>> pyNastranGUI fem.dat -f nastran

The dev version also has some amount of drag and drop support, but it's not perfect yet.

--
You received this message because you are subscribed to the Google Groups "pyNastran Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pynastran-discuss/64bc2c91-3636-49a8-8aa1-abfddab3b160n%40googlegroups.com.

Steven Doyle

unread,
Apr 18, 2025, 1:41:46 AMApr 18
to pynastra...@googlegroups.com
If you're going from source, I go in the folder with:
 - pyproject.toml
 - README.md
and type:
>>> pip install -e .

That will install it as a developer, which allows you to just do a git pull to get the latest.

Rob McDonald

unread,
Apr 18, 2025, 5:20:06 PMApr 18
to pyNastran Discuss
Thanks Steve,

I get:

% pip install pyside2 -U
ERROR: Could not find a version that satisfies the requirement pyside2 (from versions: none)
ERROR: No matching distribution found for pyside2

I think I was running into this problem before and didn't try just going past it.  Clearly I should have...  Running 'pyNastranGUI' seems to work fine.

Now I need to figure out how to use it.

Rob

Steven Doyle

unread,
Apr 18, 2025, 5:27:32 PMApr 18
to pynastra...@googlegroups.com
You can try

pip install pyqt5 -U

As well. I try to make it easy to install. Maybe just skip that part?

Rob McDonald

unread,
Apr 18, 2025, 5:31:59 PMApr 18
to pyNastran Discuss
That one worked.

That said, the program seemed to run before -- even though the pyside2 threw an error.

I appreciate all the work -- and I also know how hard it can be to do the little things -- and how hard it is to support users who don't know what they're doing...

Thanks much,

Rob
Reply all
Reply to author
Forward
0 new messages