5

The General Mission Analysis Tool (GMAT), GMAT 2020a python version is constrained to Python 3.7 due to a binary dependency in GMAT libPythonInterface.dll.

When running a python userfunction I get the notorious numpy exception:

No module named 'numpy.core._multiarray_umath'

Additional text in the error message attempts to be helpful and directs the user to their trouble shooting page, but the suggestions there are generic, erroneous, and incomplete.

How do I know what Numpy version is compatible with my GMAT installation?

4
  • try python3.7 -m pip install numpy - see here: stackoverflow.com/questions/60837548/… Commented May 29, 2022 at 21:22
  • 1
    Tried that, I got numpy v1.21. According to the NEP below, there is a change in numpy at 1.19 that is not backwards compatible. Commented May 29, 2022 at 21:51
  • 1
    According to the metadata shown on PyPI, the last released version of NumPy to support Python 3.7 is 1.21 (e.g. pypi.org/project/numpy/1.21.6). Commented May 30, 2022 at 0:10
  • Yes but nonetheless you get the "No module named 'numpy.core._multiarray_umath' error" with numpy1.21 and Python3.7. Commented May 31, 2022 at 7:29

1 Answer 1

6

A description of NumPy-Python version dependencies: nep-0029-deprecation_policy.

Conda and its dependency checker give the following versions of common applications (that I use with GMAT):

numpy 1.16
matplotlib 3.4
scipy 1.5.3
xlwings-0.26.3
xlsxwriter-3.0.2
PyQt5 5.12
Sign up to request clarification or add additional context in comments.

2 Comments

According to the document 1.18 seems to be the last version supporting py3.7.
Yes that's the way I read it, yet both PIP and Conda will install 1.21 with 3.7. At any rate with GMAT 2022a coming soon, we should be able to update out of this mess. I have had limited success with Numpy 1.18, but there is one library in SciPy that causes numpy to throw the invalid np array exception, the elliptical integrals. If you use these as I do then Numpy 1.16 is the one to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.