简体   繁体   中英

Importing talib gives error “Module 'talib' has no 'EMA' member”

I am trying to use the TA-LIB library of indicators. But after importing talib as so

import talib as ta

when using any indicator like so

ta.EMA(df['Close'], timeperiod=13)

I get the pylint error

Module 'talib' has no 'EMA' member pylint(no-member)

I followed the directions from the TA-LIB documentation on how to properly install the package. And the package can be found in the correct environment site-packages. And the code even executes without any issues. So I have no clue as to why I would be getting this issue? I am guessing it is just some pylint error where it is unable to see the correct module? I do not get the same issue in any other editor.

TA-LIB 0.4.17 | VS Code 1.44.1 | pylint 2.4.4 | python 3.7.7

You're correct that Pylint isn't able to resolve the EMA attribute for talib . Being able to execute code does not guarantee Pylint can figure things out because what happens when you run code can be so complicated that Pylint can't figure out it from simply reading the files.

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