Issues installing pynastran on windows

299 views
Skip to first unread message

Fred M

unread,
Apr 21, 2018, 11:49:09 AM4/21/18
to pyNastran Discuss
Hi there !

After a lot of tries I'm asking for your help because I am having an issue while installing pynastran :-(

I followed the procedure given there : http://pynastran-git.readthedocs.io/en/latest/quick_start/installation.html
First I have installed a freshly new anaconda 64bit python (from Anaconda3-5.1.0-Windows-x86_64.exe)
Then I install vtk by the following command :
pip install vtk
And then I install pynastran with the command :
pip install pynastran
After all that all seems good, no error.

But when I try to launch the pynastrangui I have the following error :
(E:\FRED\Anaconda3) E:\FRED\Anaconda3>pynastrangui
Using PyQt5
vtk_version
= [8]
supported_formats
= ['nastran', 'nastran', 'cart3d', 'panair', 'shabp', 'usm3d', 'tecplot', 'surf', 'ugrid', 'lawgs', 'stl', 'fast', 'bedge', 'tetgen']
Traceback (most recent call last):
 
File "e:\fred\anaconda3\lib\runpy.py", line 184, in _run_module_as_main
   
"__main__", mod_spec)
 
File "e:\fred\anaconda3\lib\runpy.py", line 85, in _run_code
   
exec(code, run_globals)
 
File "E:\FRED\Anaconda3\Scripts\pyNastranGUI.exe\__main__.py", line 9, in <module>
 
File "e:\fred\anaconda3\lib\site-packages\pyNastran\gui\gui.py", line 31, in cmd_line
   
MainWindow(inputs)
 
File "e:\fred\anaconda3\lib\site-packages\pyNastran\gui\main_window.py", line 152, in __init__
   
self.setup_gui()
 
File "e:\fred\anaconda3\lib\site-packages\pyNastran\gui\gui_common.py", line 3199, in setup_gui
   
self.restoreGeometry(settings.value("mainWindowGeometry"))
TypeError: restoreGeometry(self, Union[QByteArray, bytes, bytearray]): argument 1 has unexpected type 'NoneType'

Does anybody knows where the pb comes from? Is there a kind of version incompatibility?
Thank you a lot in advance
Fred

Steven Doyle

unread,
Apr 21, 2018, 2:45:01 PM4/21/18
to pyNastran Discuss
v1.0 of the pyNastran gui works with Python 2.7 and PyQt4 with VTK 5/6.  VTK 7 works, but has a few issues;.  What you're running into is a PyQt4 issue.

You need to use the master version if you're going to be on Python 3.5/3.6   PyQt4/5 and VTK 7/8 are supported.

--
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-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fred M

unread,
Apr 22, 2018, 3:31:20 PM4/22/18
to pyNastran Discuss
Hi and thank you for your answer!
I finally get it working ^^
Here is exactly what I've done, maybe it can be useful for somebody.

First : installation of miniconda 2.7 64bits for windows.
Then, in a conda prompt I've installed all the following packages :
pip install pynastran
conda install docopt
conda install numpy
conda install vtk
=5
conda install pyqt
=4
conda install scipy
and then the pynastrangui appears ! :)

Maybe there is a easier way by using anaconda instead of miniconda but like this it works :)

thanks again
To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.

Steven Doyle

unread,
Apr 22, 2018, 4:08:44 PM4/22/18
to pynastra...@googlegroups.com
I'll have to get you to do that again in a month when 1.1 comes iut :)

Fred M

unread,
Apr 23, 2018, 3:34:38 PM4/23/18
to pyNastran Discuss
Finally,

With the method I described with miniconda or anaconda, the python directory is about 2.6Go after all the installation!
On the other hand, by using a WinPython-64bit-2.7.13.1Zero base and installing all the packages with pip (with vtk5 and pyqt4 from here https://www.lfd.uci.edu/~gohlke/pythonlibs), it works well and the python directory is less than 500Mo : that's a good point!

Once we know how to do it's quite simple, but as everybody is not familiar with python programming maybe you should develop a little bit the installation procedure in the documentation ;-)

Now I'm gonna play with pynastran !
Thanks !

Steven Doyle

unread,
Apr 24, 2018, 12:43:45 AM4/24/18
to pyNastran Discuss
Fred,

Anaconda is definitely a kitchen sink, but I very much prefer it as it just works.  If you want something smaller, Miniconda is also nice.  Anaconda with MKL's numpy is 5x faster than stock numpy, so I definitely encourage using it.

There is a definitely a challenge to create good install instructions.  In theory, setuptools should handle all of those dependencies (so setup.py develop or pip install), but it does a poor job.  Users also typically want specific packages, so setup_no_reqs.py exists. It's also difficult in that a user might be using Anaconda vs. WinPython vs. base Python and could have incompatible numpy/scipy/vtk/Python 64/32 bit packages.  There are no install instructions for Linux/Mac because I don't know what's different.

I sort of take the approach of if you're using pyNastran, you know this sort of stuff (e.g., how to install packages, are OK with sifting through the code/QRG).  It's a big package, so it's tough to even document what's unclear, especially given that too much documentation makes it hard to find basic things.  The other challenge is the docs are already too big, so they take too long to build and as such, nothing is built.  As such, they're somewhat out of date. 

I definitely welcome pull requests though.

To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages