Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please install TA-Lib to use 2crows. (pip install TA-Lib) message ... #484

Closed
tbeesofar opened this issue Feb 6, 2022 · 8 comments
Closed
Assignees
Labels
info Informational wontfix This will not be worked on

Comments

@tbeesofar
Copy link

Which version are you running? The lastest version is on Github. Pip is for major releases.

import pandas_ta as ta
print(ta.version)

0.3.14b0

Do you have TA Lib also installed in your environment?

$ pip list

yes
image

Did you upgrade? Did the upgrade resolve the issue?

$ pip install -U git+https://github.com/twopirllc/pandas-ta

Yes.. i have installed talib using the updated version only as mentioned in the readme...

Describe the bug
[A clear and concise description of what the bug is.]

i am simply trying to import ticker data from yfinance and using df.ta.strategy(ta.AllStrategy) to build all the indicators. However, i am getting messages saying: Please install TA-Lib to use 2crows. (pip install TA-Lib)

first 7 lines of the output of df.ta.strategy(ta.AllStrategy)

0it [00:00, ?it/s][X] Please install TA-Lib to use 2crows. (pip install TA-Lib)
[X] Please install TA-Lib to use 3blackcrows. (pip install TA-Lib)
[X] Please install TA-Lib to use 3inside. (pip install TA-Lib)
[X] Please install TA-Lib to use 3linestrike. (pip install TA-Lib)
[X] Please install TA-Lib to use 3outside. (pip install TA-Lib)
[X] Please install TA-Lib to use 3starsinsouth. (pip install TA-Lib)
[X] Please install TA-Lib to use 3whitesoldiers. (pip install TA-Lib)

To Reproduce
Provide sample code.
Code:
(https://colab.research.google.com/drive/1eGviU_45HrZLDj_hSHLvXkTvw2gln-vd?usp=sharing)

Expected behavior
A clear and concise description of what you expected to happen.
My expectation is what is written in the readme that "Runs and appends all indicators to the current DataFrame by default"

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Additional context
Add any other context about the problem here.

I want to generate all the indicators at one go.. Also, I am seeing many indicators are having Null. Not sure whether it is because of the installation issue itself mentioned previously..

image

Thanks for using Pandas TA!

@tbeesofar tbeesofar added the bug Something isn't working label Feb 6, 2022
@twopirllc twopirllc assigned tbeesofar and unassigned twopirllc Feb 6, 2022
@twopirllc twopirllc added info Informational wontfix This will not be worked on and removed bug Something isn't working labels Feb 6, 2022
@twopirllc
Copy link
Owner

Hello @tbeesofar,

Actually, you have tblib installed... not talib. In fact, I don't even know what tblib is? Pandas TA was correct in identifying that you do not have talib installed. Please follow in the instructions at TA Lib to properly install it.

If you installed it correctly, you should see it in the pip list like so:
Screen Shot 2022-02-06 at 9 51 38 AM

Furthermore you said you upgraded Pandas TA, but you listed version v0.3.14, which is the last pip version. I recommend that you upgrade to the development version instead since many bugs and features in the Current Issues list have been fixed.

$ pip install -U git+https://github.com/twopirllc/pandas-ta.git@development

Let me know on your progress!

Kind Regards,
KJ

@twopirllc twopirllc changed the title Please install TA-Lib to use 2crows. (pip install TA-Lib) message is coming while generating strategies in talib even after successful installation process as mentioned in the readme Please install TA-Lib to use 2crows. (pip install TA-Lib) message ... Feb 6, 2022
@baotang2118
Copy link

baotang2118 commented Feb 7, 2022

Moreover, You also need to install the TAlib from source (the real one build from source), the python TAlib is just a wrap of real TAlib.
cc: @tbeesofar

@tbeesofar
Copy link
Author

Hi @baotang2118 @twopirllc for pointing out the error and taking time out to respond.. I gave it another try..

I was able to install it successfully in jupyter-notebook in my local system.. However, when i am trying to install the talib in google colab, it is giving me below error.. Is there anything else i have to keep in mind while installing talib in google collab?

Collecting TA-Lib
Downloading TA-Lib-0.4.24.tar.gz (269 kB)
|████████████████████████████████| 269 kB 19.3 MB/s
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from TA-Lib) (1.19.5)
Building wheels for collected packages: TA-Lib
Building wheel for TA-Lib (setup.py) ... error
ERROR: Failed building wheel for TA-Lib
Running setup.py clean for TA-Lib
Failed to build TA-Lib
Installing collected packages: TA-Lib
Running setup.py install for TA-Lib ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s8i90642/ta-lib_c8e50c5fd0b74dc881799251aaec7be1/setup.py'"'"'; file='"'"'/tmp/pip-install-s8i90642/ta-lib_c8e50c5fd0b74dc881799251aaec7be1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-lrsymhg8/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/TA-Lib Check the logs for full command output

Jupyter
image

Google collab:
image

@tbeesofar
Copy link
Author

Sorry if it is a lame question and i am missing out on something very trivial

@twopirllc
Copy link
Owner

@tbeesofar,

Sorry, been very busy. I know there is an Issue where someone got it working with Collab. Not exactly sure which it was, but I will update the Issue when I find it.

KJ

@twopirllc
Copy link
Owner

Hi @tbeesofar,

Were you able to figure it out? If so, your solution would help us all.

If you are still working on it, I wonder if Issue #329 may help? I recently read that TA Lib requires/prefers that numpy is installed before TA Lib. 🤷🏼‍♂️ But I would check on TA Lib Issues also if you haven't already.

KJ

@tbeesofar
Copy link
Author

Sorry @twopirllc , i didn't try my hands on using talib in google collab lately. Have been using talib in jupyter notebook and exporting the calculated data and importing it in google collab for the time being as a workaround.

Today, i tried the resolution given in issue #329, i was able to install it successfully in google colab.

You may choose to close this ticket if you want and let me know if you get to know anything else in the future.

keep the good work up,
Thanks
Tuhin

@twopirllc
Copy link
Owner

@tbeesofar,

Thanks!

Thanks for replying and letting me know what's happening.

KJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info Informational wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants