手动安装版本 2.7.0 在win10。
上两天配置好能跑 examples\vn_trader\run.py 出现图形界面后就心满意足的睡觉了。但今天跑报了标题的错。log如下。
神奇的是,trader\engine.py里面import这个SETTING没报错,但trader\database.py里面import就报错了。不知道是什么原因?
C:\Users\1\anaconda3\envs\vnpy-master-270\python.exe E:/Projects/vnpy-master-270/examples/vn_trader/run.py
Traceback (most recent call last):
File "E:/Projects/vnpy-master-270/examples/vn_trader/run.py", line 4, in <module>
from vnpy.trader.engine import MainEngine
File "E:\Projects\vnpy-master-270\vnpy\trader\engine.py", line 45, in <module>
from .setting import SETTINGS
File "E:\Projects\vnpy-master-270\vnpy\trader\setting.py", line 9, in <module>
from .utility import load_json
File "E:\Projects\vnpy-master-270\vnpy\trader\utility.py", line 954, in <module>
import vnpy_leveldb
File "C:\Users\1\anaconda3\envs\vnpy-master-270\lib\site-packages\vnpy_leveldb__init__.py", line 26, in <module>
from .leveldb_database import LeveldbDatabase as Database
File "C:\Users\1\anaconda3\envs\vnpy-master-270\lib\site-packages\vnpy_leveldb\leveldb_database.py", line 10, in <module>
from vnpy.trader.database import BaseDatabase, BarOverview, DB_TZ
File "E:\Projects\vnpy-master-270\vnpy\trader\database.py", line 10, in <module>
from .setting import SETTINGS
ImportError: cannot import name 'SETTINGS' from 'vnpy.trader.setting' (E:\Projects\vnpy-master-270\vnpy\trader\setting.py)
Process finished with exit code 1