VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 10
声望: 0

E:\work\vnpy-3.8.0\examples\veighna_trader>python run.py
找不到数据库驱动vnpy_sqlite,使用默认的SQLite数据库
Traceback (most recent call last):
File "d:\veighna_studio\lib\site-packages\vnpy\trader\database.py", line 152, in get_database
module: ModuleType = import_module(module_name)
File "d:\veighna_studio\lib\importlib__init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "d:\veighna_studio\lib\site-packages\vnpy_sqlite\
init__.py", line 26, in <module>
from .sqlite_database import SqliteDatabase as Database
File "d:\veighna_studio\lib\site-packages\vnpy_sqlite\sqlite_database.py", line 4, in <module>
from peewee import (
ModuleNotFoundError: No module named 'peewee'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\work\vnpy-3.8.0\examples\veighna_trader\run.py", line 99, in <module>
main()
File "E:\work\vnpy-3.8.0\examples\veighna_trader\run.py", line 76, in main
main_engine.add_app(CtaStrategyApp)
File "d:\veighna_studio\lib\site-packages\vnpy\trader\engine.py", line 102, in add_app
engine: BaseEngine = self.add_engine(app.engine_class)
File "d:\veighna_studio\lib\site-packages\vnpy\trader\engine.py", line 73, in add_engine
engine: BaseEngine = engine_class(self, self.event_engine)
File "d:\veighna_studio\lib\site-packages\vnpy_ctastrategy\engine.py", line 97, in init
self.database: BaseDatabase = get_database()
File "d:\veighna_studio\lib\site-packages\vnpy\trader\database.py", line 155, in get_database
module: ModuleType = import_module("vnpy_sqlite")
File "d:\veighna_studio\lib\importlib__init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "d:\veighna_studio\lib\site-packages\vnpy_sqlite\
init__.py", line 26, in <module>
from .sqlite_database import SqliteDatabase as Database
File "d:\veighna_studio\lib\site-packages\vnpy_sqlite\sqlite_database.py", line 4, in <module>
from peewee import (
ModuleNotFoundError: No module named 'peewee'

LLM学员
avatar
加入于:
帖子: 1546
声望: 112
pip intall peewee

安装下即可

Member
avatar
加入于:
帖子: 10
声望: 0
  creating build\temp.win-amd64-cpython-311\Release\vnpy_ctp\api\vnctp\vnctptd
  "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ivnpy_ctp/api/include -Ivnpy_ctp/api/vnctp -ID:\Users\yujinsong\anaconda3\envs\vnpy380\include -ID:\Users\yujinsong\anaconda3\envs\vnpy380\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpvnpy_ctp/api/vnctp/vnctptd/vnctptd.cpp /Fobuild\temp.win-amd64-cpython-311\Release\vnpy_ctp/api/vnctp/vnctptd/vnctptd.obj -O2 -MT
  cl: 命令行 warning D9025 :正在重写“/MD”(用“/MT”)
  vnctptd.cpp
  C:\Users\yujinsong\AppData\Local\Temp\pip-install-tinpaa38\vnpy-ctp_cc2934f8fe3d48f89993156cce1bddfb\vnpy_ctp\api\include\pybind11\cast.h(441): error C2027: 使用了未定义类型“_frame”
  D:\Users\yujinsong\anaconda3\envs\vnpy380\include\pytypedefs.h(22): note: 参见“_frame”的声明
  C:\Users\yujinsong\AppData\Local\Temp\pip-install-tinpaa38\vnpy-ctp_cc2934f8fe3d48f89993156cce1bddfb\vnpy_ctp\api\include\pybind11\cast.h(443): error C2027: 使用了未定义类型“_frame”
  D:\Users\yujinsong\anaconda3\envs\vnpy380\include\pytypedefs.h(22): note: 参见“_frame”的声明
  C:\Users\yujinsong\AppData\Local\Temp\pip-install-tinpaa38\vnpy-ctp_cc2934f8fe3d48f89993156cce1bddfb\vnpy_ctp\api\include\pybind11\cast.h(444): error C2027: 使用了未定义类型“_frame”
  D:\Users\yujinsong\anaconda3\envs\vnpy380\include\pytypedefs.h(22): note: 参见“_frame”的声明
  vnpy_ctp/api/include\pybind11/pybind11.h(1890): error C2039: "frame": 不是 "_ts" 的成员
  D:\Users\yujinsong\anaconda3\envs\vnpy380\include\cpython/pystate.h(82): note: 参见“_ts”的声明
  vnpy_ctp/api/include\pybind11/pybind11.h(1891): error C2027: 使用了未定义类型“_frame”
  D:\Users\yujinsong\anaconda3\envs\vnpy380\include\pytypedefs.h(22): note: 参见“_frame”的声明
  vnpy_ctp/api/include\pybind11/pybind11.h(1892): error C2027: 使用了未定义类型“_frame”
  D:\Users\yujinsong\anaconda3\envs\vnpy380\include\pytypedefs.h(22): note: 参见“_frame”的声明
  vnpy_ctp/api/include\pybind11/pybind11.h(1895): error C2027: 使用了未定义类型“_frame”
  D:\Users\yujinsong\anaconda3\envs\vnpy380\include\pytypedefs.h(22): note: 参见“_frame”的声明
  vnpy_ctp/api/include\pybind11/pybind11.h(1894): error C2660: “PyDict_GetItem”: 函数不接受 1 个参数
  D:\Users\yujinsong\anaconda3\envs\vnpy380\include\dictobject.h(22): note: 参见“PyDict_GetItem”的声明
  vnpy_ctp/api/vnctp/vnctptd/vnctptd.cpp(12469): warning $996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for vnpy_ctp
Running setup.py clean for vnpy_ctp
Failed to build vnpy_ctp
ERROR: Could not build wheels for vnpy_ctp, which is required to install pyproject.toml-based projects

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

第一个问题是用station的启动问题,然后源代码安装,很折腾,各种库下不下来,手工安装了ta-lib,又是少了vnpy_ctp,我的版本是python 3.11

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

沪公网安备 31011502017034号

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