vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 15
声望: 0

Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
File "c:\vnstudio\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\
init__.py", line 5, in <module>
from .engine import BacktesterEngine, APP_NAME
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 17, in <module>
from vnpy.app.cta_strategy.backtesting import BacktestingEngine, OptimizationSetting
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\backtesting.py", line 13, in <module>
import plotly.graph_objects as go
ModuleNotFoundError: No module named 'plotly'

Member
avatar
加入于:
帖子: 967
声望: 52

pip install plotly应该就可以了

Member
avatar
加入于:
帖子: 15
声望: 0

谢谢!已经安装成功了,但是还是出现Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnstation\cli.py", line 90, in run_trader
module = importlib.import_module(d["module"])
File "c:\vnstudio\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\
init__.py", line 5, in <module>
from .engine import BacktesterEngine, APP_NAME
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 17, in <module>
from vnpy.app.cta_strategy.backtesting import BacktestingEngine, OptimizationSetting
File "c:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\backtesting.py", line 13, in <module>
import plotly.graph_objects as go
ModuleNotFoundError: No module named 'plotly'

Member
avatar
加入于:
帖子: 967
声望: 52

请问是不是有多个python环境,如果有,可以看一下plotly是不是安装在vnpy所在的python环境下

Member
avatar
加入于:
帖子: 15
声望: 0

谢谢!在vnstudio文件夹下安装后就能运行了。

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