VeighNa量化社区
你的开源社区量化交易平台 | vn.py | vnpy
Member
avatar
加入于:
帖子: 6
声望: 0

手动安装,脚本启动,如果加载此行代码 from vnpy_optionmaster import OptionMasterApp 会出现以下提示:

(vn.py) PS D:\CodeComputerLanguage\GitCode\vnpy-master> python run.py

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.5 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 "D:\CodeComputerLanguage\GitCode\vnpy-master\run.py", line 31, in <module>
from vnpy_optionmaster import OptionMasterApp # 期权波动率交易模块
File "D:\CodeComputerLanguage\CodeApp\miniconda3\envs\vn.py\lib\site-packages\vnpy_optionmaster__init__.py", line 26, in <module>
from .engine import OptionEngine, APP_NAME
File "D:\CodeComputerLanguage\CodeApp\miniconda3\envs\vn.py\lib\site-packages\vnpy_optionmaster\engine.py", line 35, in <module>
from .pricing import binomial_tree_cython as binomial_tree
Faile to import cython option pricing model, please rebuild with cython in cmd.

将numpy降级到1.26.4 后解决。
但降级后pip警告:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
vnpy 4.1.0 requires numpy>=2.2.3, but you have numpy 1.26.4 which is incompatible.

希望版主下次升级 vnpy 版本时可以解决这个问题。

Member
avatar
加入于:
帖子: 5527
声望: 334

收到,谢谢反馈

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】