在 Spyder 编辑器 (Windows) 上的 Anaconda 中安装 QuantLib [英] Installing QuantLib in Anaconda on the Spyder Editor (Windows)

查看:51
本文介绍了在 Spyder 编辑器 (Windows) 上的 Anaconda 中安装 QuantLib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Anaconda 中安装 QuantLib 包.我试过下面的代码;

How do I install the QuantLib Package in Anaconda. I have tried the following code;

import QuantLib as ql

但我得到以下结果;

ModuleNotFoundError: No module named 'QuantLib'

谁能帮帮我

推荐答案

您首先需要安装 QuantLib 包.我发现的最简单的方法是安装 Anaconda 4.3.1(link),以管理员身份打开命令提示符,然后运行:

You first need to install the QuantLib package. The easiest way I found is to install Anaconda 4.3.1 (link), open a Command Prompt as Admin and run:

pip 安装 QuantLib-Python

对我来说,这只适用于最新版本的 Anaconda,包括 Python 3.6,认为 QuantLib-Python 包最近才在 PIP 中实现.这可能也适用于其他最近安装的 Python,但它在旧版本的 Anaconda 或 Python 3.5 上对我有用.

For me, this only worked on the latest version of Anaconda including Python 3.6, think the QuantLib-Python package was implemented in PIP only very recently. This might work for other recent installations of Python as well, but it did not work for me on older versions of Anaconda or Python 3.5.

这篇关于在 Spyder 编辑器 (Windows) 上的 Anaconda 中安装 QuantLib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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