GHA: MacOS failure to import numpy
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 160
- Forks
- 113
- Avg merge
- 12d 15h
- Merged PRs (30d)
- 1
Description
https://github.com/UCL/STIR/runs/4716700749?check_suite_focus=true#step:11:37
/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
swig/test/python/test_IO.py:14: in <module>
from stir import *
../install/python/stir.py:15: in <module>
from _stir import *
E ImportError: numpy.core.multiarray failed to import
------------------------------- Captured stderr --------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/numpy/__init__.py", line 380, in <module>
raise RuntimeError(msg)
More than likely due to version conflict between the brew Python and another one, see e.g. https://stackoverflow.com/questions/58342005/macos-python3-with-brew-error-on-import-cv2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the linked macOS GitHub Actions run, the Python environment it uses, and swig/test/python/test_IO.py, which imports stir through install/python/stir.py. Reproduce the failure with that environment; done means the macOS job imports stir and numpy successfully and the test passes without the multiarray error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, github-actions, numpy, python
- Domain
- ci-cd, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100