安装QuantLib Python时出现问题 [英] Issue installing QuantLib Python

查看:387
本文介绍了安装QuantLib Python时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装QuantLib Python.因此,我遵循并安装了:

I am trying to install QuantLib Python. So, I followed through and installed:

1)Anaconda3,boost_1_64_0,QuantLib-1.10,QuantLib-SWIG-1.10,swigwin-3.0.12.

1) Anaconda3, boost_1_64_0, QuantLib-1.10, QuantLib-SWIG-1.10,swigwin-3.0.12.

2)我使用Visual Studio 2017 QuantLib安装.我关注了一个youtube视频,并设法正确安装了该视频并运行了一个示例.

2) I installed using Visual Studio 2017, QuantLib. I followed a youtube video and managed to install it correctly and run an example.

3)然后,我切换回 http://quantlib.org/install中的指示/windows-python.shtml ,我执行以下命令:

3) Then I switched back to the indications in http://quantlib.org/install/windows-python.shtml, I execute the commands:

cd C:\local\QuantLib-SWIG-1.10\Python
set QL_DIR=C:\local\QuantLib-1.10
set INCLUDE=C:\local\boost_1_64_0
python setup.py build

但是它失败了...总结了我得到的东西:

but it fails...summarizing what I get:

C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ BIN \ x86_amd64 \ link.exe/nologo/INCREMENTAL:NO/LTCG/DLL/MANIFEST:EMBED,ID = 2/MANIFESTUAC:NO/LIBPATH :C:\ local \ Anaconda3 \ libs/LIBPATH:C:\ local \ Anaconda3 \ PCbuild \ amd64/LIBPATH:C:\local\QuantLib-1.10\lib"/LIBPATH:C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ LIB \ amd64"/LIBPATH:C:\ Program Files(x86)\ Windows Kits \ 10 \ lib \ 10.0.15063.0 \ ucrt \ x64"/LIBPATH:C:\ Program Files(x86)\ Windows Kits \ NETFXSDK \ 4.6.1 \ lib \ um \ x64"/LIBPATH:C:\ Program Files(x86)\ Windows Kits \ 10 \ lib \ 10.0.15063.0 \ um \ x64"/EXPORT:PyInit__QuantLib build \ temp .win-amd64-3.6 \ Release \ QuantLib/quantlib_wrap.obj/OUT:build\lib.win-amd64-3.6\QuantLib_QuantLib.cp36-win_amd64.pyd/IMPLIB:build\temp.win-amd64-3.6\Release\QuantLib_QuantLib .cp36-win_amd64.lib/subsystem:windows/machine:x64

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\local\Anaconda3\libs /LIBPATH:C:\local\Anaconda3\PCbuild\amd64 /LIBPATH:C:\local\QuantLib-1.10\lib "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\um\x64" /EXPORT:PyInit__QuantLib build\temp.win-amd64-3.6\Release\QuantLib/quantlib_wrap.obj /OUT:build\lib.win-amd64-3.6\QuantLib_QuantLib.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\QuantLib_QuantLib.cp36-win_amd64.lib /subsystem:windows /machine:x64

 LINK : fatal error LNK1104: cannot open file 'QuantLib-vc140-x64-mt.lib'
 error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1104

我确实在文件夹C:\ local \ QuantLib-1.10 \ lib中有两个文件QuantLib-vc141-mt-gd.lib和QuantLib-vc141-mt.lib.我确定问题与我未正确分配的某些路径有关,但我不知道还要尝试什么.谢谢!

I do have two files QuantLib-vc141-mt-gd.lib and QuantLib-vc141-mt.lib inside the folder C:\local\QuantLib-1.10\lib. I am sure the problem has to do with some path that I am not assigning correctly, but I don't know what else to try. Thanks!

推荐答案

您的路径正确,但是Python使用的是Visual Studio 2015(因为它是使用它编译的),而您使用的库是使用Visual Studio 2017生成的.如果您始终使用2015版,则应该可以使用.

Your paths are correct, but Python is using Visual Studio 2015 (because it's what it was compiled with) and the library you have was produced with Visual Studio 2017. If you use the 2015 version throughout, it should work.

这篇关于安装QuantLib Python时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆