Noob help with "No module named _multiarray_umath" on Mac Catalina with HomeBrew
Hello;
I'm a noob python programmer and I am on a mac running catalina 10.15. I installed python with HomeBrew (pip3) and I am writing a "simple" script to manipulate/redact PDFs and images. Key modules in use are pytesseract and magick wand (ImageMagick binding).
It was almost working perfectly.....and then all hell broke loose.
The script was running fine until I tried to add in OpenCV. Once I installed that package via pip, I started getting the dreaded "No module named _multiarray_umath" error.
It looks to me that pytesseract is broken now as a side-effect of the OpenCV install. I've tried uninstalling and reinstalling several modules, and I've tried manipulating the path.
The real problem is that I am a noob, and I just don't know much about Python.
I'm hoping to get some noob-friendly kind suggestions regarding what to check.
Any help appreciated.
Thanks!
Mark
Here are the details:
Traceback (most recent call last):
File "/Users/a0xxxxxx/PycharmProjects/sgs-pdf-redact.py/spr.py", line 19, in <module>
import pytesseract
File "/Users/a0xxxxxx/PycharmProjects/sgs-pdf-redact.py/venv/lib/python2.7/site-packages/pytesseract/__init__.py", line 1, in <module>
from .pytesseract import ( # noqa: F401
File "/Users/a0xxxxxx/PycharmProjects/sgs-pdf-redact.py/venv/lib/python2.7/site-packages/pytesseract/pytesseract.py", line 30, in <module>
from numpy import ndarray
File "/Users/a0xxxxxx/Library/Python/3.7/lib/python/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/Users/a0xxxxxx/Library/Python/3.7/lib/python/site-packages/numpy/core/__init__.py", line 50, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python2.7 from "/Users/a0321758/PycharmProjects/sgs-pdf-redact.py/venv/bin/python"
* The NumPy version is: "1.18.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named _multiarray_umath
Process finished with exit code 1
Please sign in to leave a comment.
OK -- this was silly. Somehow whatever I did caused me to revert all the way back to Python 2.7. Forcing the project back to 3.7 fixed it. Sorry fo the silly question.