I am trying to import numpy with python3 on MacOS mojave. I am getting this error. I don't know if it has something to do with a virtual environment or something like that.
Error:
PyCapsule_Import could not import module "datetime"
I have tried reinstalling python3 and reinstalling numpy
In my case I had this problem, because my script was called math.py, which caused module import problems. Make sure your own python files do not share name with some of common module names. After I renamed my script to something else, I could run script normally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With