简体   繁体   中英

ImportError - arch module python

I am trying to use the arch module in python. After installing it, I succesfully imported arch_model by executing from arch import arch_model .

However, I also need to use other functions, such as ConstantMean , as documented on the maintainers github here .

Yet, when I try to import it, it gives me the following error:

ImportError: cannot import name 'ConstantMean' from 'arch' (C:\Users\frede\anaconda3\envs\earnings_risk\lib\site-packages\arch_ init _.py)

When I check the functions available in the module via dir(arch) it also does not list ConstantMean , nor most of the other functions that should theoretically be available according to the documentation. What can be the reason for this? Any help is appreciated.

Try This:

from arch.univariate import ConstantMean

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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