pyNastran and numpy installs

16 views
Skip to first unread message

clarkbr...@gmail.com

unread,
Mar 28, 2026, 12:26:27 PM (6 days ago) Mar 28
to pyNastran Discuss
Steve,
We are really struggling with getting students to install pyNastran in a Python environment. We have50+ students each semester. They are 6th to 8th semester undergraduates and their personal computers are a real mess. To simplify my problems, I have reduced their run time requirements to just a Python and the libs pyNastran and I require. Starting last fall we started stumbling over what seems to be numpy change to distributing in source only. That is, a few versions back we could find Pythons that pulled a binary numpy. Now current Pythons seem to insist on a build from source scripted install of numpy. This requires a C++ compiler. That is my problem. Easy to do, say with MSVC Community edition, but many arcane steps that students don't perform well. And, if they have to do it, they don't need a C++ compiler for anything else other than installing numpy.
It seems pyNastran wants its own particular numpy version that always results in this build from source numpy. Even if we put another binary numpy in the Python environment before installing pyNastran.
Can you do anything to help us avoid the pyNastran installation from source of numpy?
Thanks,
Clark

Andrew Roberts

unread,
Mar 28, 2026, 5:31:16 PM (5 days ago) Mar 28
to pynastra...@googlegroups.com
This Python 3.12 env?

Try:

pip install --only-binary :all: pyNastran


—Andrew

--
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/ef899a81-6da4-401e-97e8-d3a0d0f7ff40n%40googlegroups.com.

steve

unread,
Mar 29, 2026, 6:24:53 PM (4 days ago) Mar 29
to pyNastran Discuss
I definitely don't recommend installing python/numpy/scipy from source. It's ok for python/numpy on Linux, but it's terrible for scipy. Doing it on Windows is way beyond me. I can't even setup a C compiler on Windows.

I think you're running into issues pip being greedy with packages. I'm not sure what platform you're on or what version it's trying to download, but the last numpy 1.x release was 1.26.4 (https://pypi.org/project/numpy/1.26.4/#files).

My solution for issues like that is to go to PyPI, search for the package and find a version that supports the desired python version. Then you can pip install that version and then pyNastran and it shouldn't have to download anything extra. If there are conflicts, I also try to make sure to have a scipy, matplotlib, etc. version that is were released around the same time.

clarkbr...@gmail.com

unread,
Mar 30, 2026, 12:53:46 PM (4 days ago) Mar 30
to pyNastran Discuss
Steve and Andrew,
Thanks for the help. I know this is difficult because of environments. And my poor knowledge of such stuff.
There is a heavy requirement to simplify the installation process, since students run amok.
We are on Windows 10/11.
I had the students install latest (3.14) from python.org. In that environment, installing pyNastran results in automatically installing numpy from source. Regardless of an existing numpy install.
The instructor aka professor balked at this. He figured out that forcing Python 3.12.9 causes pyNastran to not build numpy from source.
While this solves the problem for now, I really really need to know what is happening.
Let me be clear: nothing I knowingly did sent pyNastran down the numpy from source path.
Clark

Steven Doyle

unread,
Mar 30, 2026, 2:33:30 PM (4 days ago) Mar 30
to pynastra...@googlegroups.com
The python 3.14 bit sent you down the numpy build path. There was a major difference in release date between when the numpy version you were trying to use vs the python version. If you’re on 1.4.1, it was designed for python 3.10-3.12 and has bugs with 3.14 and ideally wouldn’t try to install under 3.14.

clarkbr...@gmail.com

unread,
Mar 30, 2026, 4:52:32 PM (3 days ago) Mar 30
to pyNastran Discuss
Re: " The python 3.14 bit sent you down the numpy build path. "
Oh.

Reply all
Reply to author
Forward
0 new messages