ImportError: numpy.core.multiarray failed to import

 

Hi

Can anyone help me with this import error? I did get numpy 1.19.1 installed and I still got this error. I am using conda enviroment. Please see below error message. Thank you so much for your help.


import numpy as np print(np.__version__)

1.19.2


--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_5788/3086708213.py in <module>
----> 1 from MT5 import *   # we have error when importing so remove it need to fix it later(YLiu)
      2 import numpy as np
      3 import pandas as pd
      4 import warnings
      5 warnings.filterwarnings("ignore")

C:\Python_Sync\PythonforFinanceAlgorithmicTrading\Chapter_09\MT5.py in <module>
      2 from datetime import datetime
      3 import pandas as pd
----> 4 import MetaTrader5 as mt5
      5 warnings.filterwarnings("ignore")
      6 mt5.initialize()

~\AppData\Roaming\Python\Python38\site-packages\MetaTrader5\__init__.py in <module>
    255 
    256 # import C methods to our module
--> 257 from ._core import *
    258 
    259 # internal order send

ImportError: numpy.core.multiarray failed to import
 
anyone can help me? I tried to create a new environment and it never works, please help!  Thanks
 

pip install -U numpy

solved it for me
 
Blue Neurons #:

pip install -U numpy

solved it for me
Thank you Blue Neurons, Yes it works. I appreciate it.
 
Blue Neurons #:

pip install -U numpy

solved it for me
Same problem, solved !! Tks