0

点子列表显示:

Package                Version
---------------------- ---------
absl-py                0.9.0
arch                   4.15
async-generator        1.10
attrs                  19.3.0
auquan-toolbox         2.1.92
backcall               0.1.0
.....

但是当我使用 from arch 时import arch_model,我收到以下错误:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-52-f7e7e7ccf968> in <module>
----> 1 from arch import arch_model

ModuleNotFoundError: No module named 'arch'

谁能帮忙?

4

1 回答 1

1

你使用的是 Python3 还是 Python2?您必须根据 github 文档https://github.com/bashtage/arch将 Python3 与 pip3 一起使用:arch 仅是 Python 3。4.8 版是支持 Python 2.7 的最终版本。

使用 Python3 和 pip3 我让它工作:

拱 4.15 ($ pip3 list | grep arch)
这有效:

import arch

但我认为你想要那个命令:

from arch import arch_model

两者都成功。

(带有 pip3 的 Python 3.8.2)

于 2020-07-30T05:32:39.730 回答