简体   繁体   English

Quantlib-python 已安装但未找到

[英]Quantlib-python installed but not found

newbie in Python I am trying to play around with quantlib-python on my basic Win10 64bits. Python 中的新手我正在尝试在我的基本 Win10 64 位上使用 quantlib-python。 So I installed the package from Pypi but it's not found in Python.所以我从 Pypi 安装了 package,但在 Python 中找不到。 here is the console:这是控制台:

pip install QuantLib-Python pip 安装 QuantLib-Python

Collecting QuantLib-Python Using cached QuantLib_Python-1.18-py2.py3-none-any.whl (1.4 kB) Collecting QuantLib Using cached QuantLib-1.18-cp38-cp38-win32.whl (9.7 MB) Installing collected packages: QuantLib, QuantLib-Python Successfully installed QuantLib-1.18 QuantLib-Python-1.18使用缓存的 QuantLib_Python-1.18-py2.py3-none-any.whl (1.4 kB) 收集 QuantLib-Python 使用缓存的 QuantLib-1.18-cp38-cp38-win32.whl (9.7 MB) 收集 QuantLib 安装收集的软件包:QuantLib、QuantLib- Python成功安装QuantLib-1.18 QuantLib-Python-1.18

Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32 输入“帮助”、“版权”、“信用”或“许可证”以获取更多信息。

import Quantlib as ql将 Quantlib 导入为 ql

Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'Quantlib'回溯(最后一次调用):文件“”,第 1 行,在 ModuleNotFoundError:没有名为 'Quantlib' 的模块

any idea how to solve this?知道如何解决这个问题吗? Am I supposed to compile the source code of Quantlib?我应该编译 Quantlib 的源代码吗?

Try using尝试使用

import QuantLib as ql

with a capital Q and a capital L.大写的 Q 和大写的 L。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM