我想请问一下各位大神

 

这错误是怎么回事  meta trader5的库是最新的  

NumPy也是最新 python 重装了 

pycharm也是重装的   为什么就是会报这个错误



A module that was compiled using NumPy 1.x cannot be run in

NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "C:\Users\HONOR\Documents\WeChat Files\wxid_4ugf45vw95yk21\FileStorage\File\2024-06\测试55.py", line 2, in <module>
    import MetaTrader5 as mt5
  File "F:\python\pythonProject-EA\.venv\Lib\site-packages\MetaTrader5\__init__.py", line 258, in <module>
    from ._core import *
Traceback (most recent call last):
  File "F:\python\pythonProject-EA\.venv\Lib\site-packages\numpy\core\_multiarray_umath.py", line 44, in __getattr__
    raise ImportError(msg)
ImportError: 
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.


Traceback (most recent call last):
  File "C:\Users\HONOR\Documents\WeChat Files\wxid_4ugf45vw95yk21\FileStorage\File\2024-06\测试55.py", line 2, in <module>
    import MetaTrader5 as mt5
  File "F:\python\pythonProject-EA\.venv\Lib\site-packages\MetaTrader5\__init__.py", line 258, in <module>
    from ._core import *
ImportError: numpy.core.multiarray failed to import

Process finished with exit code 1

 
https://stackoverflow.com/questions/78641150/a-module-that-was-compiled-using-numpy-1-x-cannot-be-run-in-numpy-2-0-0-as-it-ma
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must
  • 2024.06.19
  • Free Palestine
  • stackoverflow.com
I installed numpy 2.0.0 then I installed: I am getting this error:
 
这个需要专业人士来回答哈哈
 
确实很专业 超出了 知识点
 

numpy升级到2.0以上版本后确实会导致大量依赖它的其他库产生不兼容现象

可以强制重新安装numpy 1.x的最后一个版本解决

如果你是使用pip包管理的话:

pip install --force-reinstall -v "numpy==1.26.4"