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

环境,
1 win10
2 python10.1
3 anaconda装在d盘
4 换成交大源,

错误
building 'vnpy_ctp.api.vnctptd' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\vnpy_ctp
creating build\temp.win-amd64-cpython-311\Release\vnpy_ctp\api
creating build\temp.win-amd64-cpython-311\Release\vnpy_ctp\api\vnctp
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-ach6g75i\vnpy-ctp_d0e52d3723ea4c12946fe6584021c41b\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-ach6g75i\vnpy-ctp_d0e52d3723ea4c12946fe6584021c41b\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-ach6g75i\vnpy-ctp_d0e52d3723ea4c12946fe6584021c41b\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

另外Python 11 运行install.bat的时候遇到这样的错误,
ERROR: Ignored the following versions that require a different python version: 6.3.0 Requires-Python <3.11,>=3.6; 6.3.1 Requires-Python <3.11,>=3.6; 6.3.2 Requires-Python <3.11,>=3.6; 6.4.0 Requires-Python <3.11,>=3.6
ERROR: Could not find a version that satisfies the requirement PySide6==6.3.0 (from versions: 6.4.0.1, 6.4.1, 6.4.2, 6.4.3, 6.5.0, 6.5.1, 6.5.1.1, 6.5.2)
ERROR: No matching distribution found for PySide6==6.3.0

Member
avatar
加入于:
帖子: 4711
声望: 287

可以用python 3.10试试看,不行的话建议一键安装studio试试

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

用python 3.9 遇上楼主的错误一,用python 3.11 则是错误二,用3.10 完美解决。

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

沪公网安备 31011502017034号

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