请问这个报错该如何解决?
PS C:\Windows\system32> pip install vnpy_ctptest==6.5.1.5
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting vnpy_ctptest==6.5.1.5
Using cached https://mirrors.aliyun.com/pypi/packages/b8/98/aef6385be9d433871c69b77586c47c77a70e9af5b2f7bedf9d9e5181fac9/vnpy_ctptest-6.5.1.5.ta
r.gz (6.3 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting importlib_metadata (from vnpy_ctptest==6.5.1.5)
Downloading https://mirrors.aliyun.com/pypi/packages/ff/94/64287b38c7de4c90683630338cf28f129decbba0a44f0c6db35a873c73c4/importlib_metadata-6.7.0
-py3-none-any.whl (22 kB)
Requirement already satisfied: zipp>=0.5 in c:\python38-32\lib\site-packages (from importlib_metadata->vnpy_ctptest==6.5.1.5) (3.15.0)
Building wheels for collected packages: vnpy_ctptest
Building wheel for vnpy_ctptest (setup.py): started
Building wheel for vnpy_ctptest (setup.py): finished with status 'error'
pip : error: subprocess-exited-with-error
所在位置 行:1 字符: 1
- pip install vnpy_ctptest==6.5.1.5
~~~~~~~~~
- CategoryInfo : NotSpecified: ( error: subprocess-exited-with-error:String) [], RemoteException
- FullyQualifiedErrorId : NativeCommandError
python setup.py bdist_wheel did not run successfully.
exit code: 1
[119 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\vnpy_ctptest
copying vnpy_ctptest__init.py -> build\lib.win32-3.8\vnpy_ctptest
creating build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\ctp_constant.py -> build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\init.py -> build\lib.win32-3.8\vnpy_ctptest\api
creating build\lib.win32-3.8\vnpy_ctptest\gateway
copying vnpy_ctptest\gateway\ctptest_gateway.py -> build\lib.win32-3.8\vnpy_ctptest\gateway
copying vnpy_ctptest\gateway\init.py -> build\lib.win32-3.8\vnpy_ctptest\gateway
running egg_info
writing vnpy_ctptest.egg-info\PKG-INFO
writing dependency_links to vnpy_ctptest.egg-info\dependency_links.txt
writing requirements to vnpy_ctptest.egg-info\requires.txt
writing top-level names to vnpy_ctptest.egg-info\top_level.txt
reading manifest file 'vnpy_ctptest.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.pyd' under directory 'vnpy_ctptest'
writing manifest file 'vnpy_ctptest.egg-info\SOURCES.txt'
creating build\lib.win32-3.8\vnpy_ctptest\api\vnctp
creating build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\vnctpmd.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
creating build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\vnctptd.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\libthostmduserapi_se.so -> build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\libthosttraderapi_se.so -> build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\thostmduserapi_se.dll -> build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\thosttraderapi_se.dll -> build\lib.win32-3.8\vnpy_ctptest\api
creating build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_header_define.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_header_function.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_header_on.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_header_process.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_function.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_module.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_on.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_process.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_switch.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_task.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_header_define.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_header_function.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_header_on.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_header_process.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_function.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_module.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_on.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_process.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_switch.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_task.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
creating build\lib.win32-3.8\vnpy_ctptest\api\include
creating build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
copying vnpy_ctptest\api\include\ctp\ThostFtdcMdApi.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
copying vnpy_ctptest\api\include\ctp\ThostFtdcTraderApi.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
copying vnpy_ctptest\api\include\ctp\ThostFtdcUserApiDataType.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
copying vnpy_ctptest\api\include\ctp\ThostFtdcUserApiStruct.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
creating build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\attr.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\buffer_info.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\cast.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\chrono.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\common.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\complex.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\eigen.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\embed.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\eval.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\functional.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\iostream.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\numpy.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\operators.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\options.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\pybind11.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\pytypes.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\stl.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\stl_bind.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
creating build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\class.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\common.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\descr.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\init.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\internals.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\typeid.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
creating build\lib.win32-3.8\vnpy_ctptest\api\libs
copying vnpy_ctptest\api\libs\thostmduserapi_se.lib -> build\lib.win32-3.8\vnpy_ctptest\api\libs
copying vnpy_ctptest\api\libs\thosttraderapi_se.lib -> build\lib.win32-3.8\vnpy_ctptest\api\libs
copying vnpy_ctptest\api\vnctp\vnctp.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp
copying vnpy_ctptest\api\vnctp\vnctpmd\dllmain.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\stdafx.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\stdafx.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\targetver.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\vnctpmd.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctptd\dllmain.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\stdafx.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\stdafx.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\targetver.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\vnctptd.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
running build_ext
building 'vnpy_ctptest.api.vnctptd' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\vnpy_ctptest
creating build\temp.win32-3.8\Release\vnpy_ctptest\api
creating build\temp.win32-3.8\Release\vnpy_ctptest\api\vnctp
creating build\temp.win32-3.8\Release\vnpy_ctptest\api\vnctp\vnctptd
D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I
vnpy_ctptest/api/include -Ivnpy_ctptest/api/vnctp -Ic:\python38-32\include -Ic:\python38-32\include "-ID:\Program Files\Microsoft Visual Studio\2
022\Community\VC\Tools\MSVC\14.35.32215\include" "-ID:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-ID:\Window
s Kits\10\include\10.0.22621.0\ucrt" "-ID:\Windows Kits\10\include\10.0.22621.0\um" "-ID:\Windows Kits\10\include\10.0.22621.0\shared" "-ID:\
Windows Kits\10\include\10.0.22621.0\winrt" "-ID:\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFX
SDK\4.8\include\um" /EHsc /Tpvnpy_ctptest/api/vnctp/vnctptd/vnctptd.cpp /Fobuild\temp.win32-3.8\Release\vnpy_ctptest/api/vnctp/vnctptd/vnctptd.ob
j -O2 -MT
cl: 命令行 warning D9025 :正在重写“/MD”(用“/MT”)
vnctptd.cpp
C:\Users\许鑫\AppData\Local\Temp\pip-install-nl1207wq\vnpy-ctptest_b579fc09a78245a18d72d4dc3c1bbff8\vnpy_ctptest\api\include\ctp\ThostFtdcUserApi
Struct.h(7950): warning $819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
C:\Users\许鑫\AppData\Local\Temp\pip-install-nl1207wq\vnpy-ctptest_b579fc09a78245a18d72d4dc3c1bbff8\vnpy_ctptest\api\include\ctp\ThostFtdcUserApi
Struct.h(9060): warning $819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
vnpy_ctptest/api/vnctp/vnctptd/vnctptd.cpp(11526): warning $996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s in
stead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
Running setup.py clean for vnpy_ctptest
vnpy_ctptest/api/vnctp\vnctp.h(117): warning $996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disa
ble deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
vnpy_ctptest/api/vnctp/vnctptd/vnctptd.cpp(8570): note: 查看对正在编译的函数 模板 实例化“void getString<11>(const pybind11::dict &,const char ,char (&)[11])”
的引用
D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /
MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:vnpy_ctptest/api/libs /LIBPATH:vnpy_ctptest/api /LIBPATH:c:\python38-32\libs /LIBPATH:c:\python38-32
\PCbuild\win32 "/LIBPATH:D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\lib\x86" "/LIBPATH:C:\Program Files (x
86)\Windows Kits\NETFXSDK\4.8\lib\um\x86" "/LIBPATH:D:\Windows Kits\10\lib\10.0.22621.0\ucrt\x86" "/LIBPATH:D:\Windows Kits\10\lib\10.0.22621.0\
\um\x86" thostmduserapi_se.lib thosttraderapi_se.lib /EXPORT:PyInit_vnctptd build\temp.win32-3.8\Release\vnpy_ctptest/api/vnctp/vnctptd/vnctptd.o
bj /OUT:build\lib.win32-3.8\vnpy_ctptest\api\vnctptd.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\vnpy_ctptest/api/vnctp/vnctptd\vnctptd.c
p38-win32.lib
正在创建库 build\temp.win32-3.8\Release\vnpy_ctptest/api/vnctp/vnctptd\vnctptd.cp38-win32.lib 和对象 build\temp.win32-3.8\Release\vnpy_ctptest/api/vn
ctp/vnctptd\vnctptd.cp38-win32.exp
vnctptd.obj : error LNK2001: 无法解析的外部符号 "public: static class CThostFtdcTraderApi * cdecl CThostFtdcTraderApi::CreateFtdcTraderApi(char const
*)" (?CreateFtdcTraderApi@CThostFtdcTraderApi@@SAP$1@PBD@Z)
build\lib.win32-3.8\vnpy_ctptest\api\vnctptd.cp38-win32.pyd : fatal error LNK1120: 1 个无法解析的外部命令
error: command 'D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86\link.exe' failed
with exit status 1120
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for vnpy_ctptest
Failed to build vnpy_ctptest
ERROR: Could not build wheels for vnpy_ctptest, which is required to install pyproject.toml-based projects