掘金社区

回测没问题但是模拟却报错Pinned highlighted

chenney_huang 发表在策略研究 2021-06-21 09:58:43

策略研究
435
3
0

C:\ProgramData\Anaconda3\envs\DigGoldQuant\lib\site-packages\numpy_init_.py:143: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import distributor_init
Traceback (most recent call last):
File "C:\Users\EDZ.goldminer3\projects\497fbef5-ce73-11eb-b55e-a8a15904f35b\main.py", line 2, in <module>
from gm.api import *
File "C:\ProgramData\Anaconda3\envs\DigGoldQuant\lib\site-packages\gm\api_init
.py", line 10, in <module>
from gm.model.storage import Context
File "C:\ProgramData\Anaconda3\envs\DigGoldQuant\lib\site-packages\gm\model\storage.py", line 10, in <module>
import pandas as pd
File "C:\ProgramData\Anaconda3\envs\DigGoldQuant\lib\site-packages\pandas_init_.py", line 16, in <module>
raise ImportError(
ImportError: Unable to import required dependencies:
numpy:

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: Python3.8 from "C:\ProgramData\Anaconda3\envs\DigGoldQuant\python.exe"
  • The NumPy version is: "1.20.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

开始以为是numpy的版本问题,连续更新了pandas和numpy却还是报同样的错误

评论: 3
  • 0_1624241182963_error.PNG

    什么鬼。。。我看到网上说numpy1.18配对python3.2已经把numpy的版本降到1.18(如图所示),为啥模拟跑策略那里还是报同样的错还硬是说numpy的版本是1.20?

    2021-06-21 10:07:49
  • 晕死,好不容易版本也降到1.18把问题解决却报另一个错误说这个版本太低。。。
    Traceback (most recent call last):
    File "C:\Users\EDZ.goldminer3\projects\497fbef5-ce73-11eb-b55e-a8a15904f35b\main.py", line 3, in <module>
    import talib
    File "C:\ProgramData\Anaconda3\envs\DigGoldQuant\lib\site-packages\talib_init_.py", line 52, in <module>
    from ._ta_lib import (
    File "talib_ta_lib.pyx", line 1, in init talib._ta_lib
    ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

    2021-06-21 10:19:56
  • 试出来了。。。numpy版本目前只能使用1.20.0。。。。

    2021-06-21 11:54:49

Looks like your connection to 掘金量化社区 - 量化交易者的交流社区 was lost, please wait while we try to reconnect.