-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
How to install the ta-lib with Anaconda? #156
Comments
I'm not sure. In the What happens if you do |
This is what I get: C:\ProgramData\Anaconda3\Scripts>conda.exe info ta-lib
Btw: Is talib from Quantopian? |
No, this is not a Quantopian project. And this is just a lightweight wrapper for a "TA-Lib" C library that has been around for 15 years or so. Ah, well your conda thing is probably a different issue. Since the underlying TA-Lib library isn't released as 64-bit binary on Windows, you have to build it yourself. Or get a pre-built binary that you can use. Here is a comment from someone getting it to work with Anaconda 64-bit and the previous comment in that thread has some instructions on how to build it yourself if you don't want to trust whatever binary that download is. |
@mrjbq7 |
try:
|
^ it is depreciated for python 3.6 |
I'm currently working on a conda-forge recipe for this library: So far, I have created Windows 64 recipes (for ta-lib 0.4.16) only. It would be nice if someone could give it a try: Install:
Testing:
If everything goes alright, the following is expected:
|
`Solving environment: done Package Planenvironment location: C:\ProgramData\Anaconda3 added / updated specs: The following packages will be downloaded:
The following NEW packages will be INSTALLED:
The following packages will be UPDATED:
Proceed ([y]/n)? y Downloading and Extracting Packages Rolling back transaction: done PermissionError(13, 'Accesso negato')` |
It seems something unrelated to TA-lib, it went wrong while uninstalling |
I installed it via pip, getting this wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs |
Yep, that works, but this issue is about installing TA-lib using Anaconda. Having a well-tested and well-defined publicly available build process to build conda recipes is also useful to build pip wheels. This will help not only Windows users but those in Unix systems as well. |
@masdeseiscaracteres it works on windows 10, 64 bit, using miniconda4 and pyhton36. |
Cool! Let's go then for the win32 and Unix wheels |
it shows me that the python doesnot support that type of wheel format |
Which is the bitness of your Python interpreter? When starting the Python interpreter in the terminal/command line you may see a line like:
What does yours say? |
python 3.6.5 32 bit compiler |
That's it then. The packages in https://anaconda.org/masdeseiscaracteres/TA-Lib/files?type=conda are only for 64 bit Python. I have been told conda-forge no longer supports 32 bit builds. |
Great! talib running on my Windows10 machine, conda64 and python 3.6 But look at this..interesting..it seems that maybe is it not installed properly? |
@masdeseiscaracteres here with Windows 10 64bit and Python 3.6 install so fine. Now, I'will test the lib work. #AllForABetterBrazil |
example:
but the tests went ok.. what´s wrong? |
@jorgeog96 Are you trying to import it from a python shell that was started from the git checkout directory? That would cause it to find/load the wrong ta-lib module. |
I am not pretty sure...but you´re right! If I trying to reproduce the code using jupyter notebook (but my same environment) the thing is OK! but using visual studio code with that environment in an anaconda terminal (inside VS) the code is wrong and get the wrong module. What is the problem? |
You can see where the module code is loading from: This is what a "system" install would generally look like: >>> import talib
>>> talib.__file__
'/usr/local/lib/python3.6/site-packages/talib/__init__.py' This is what "loading from a git checkout" might look like: >>> import talib
>>> talib.__file__
'/home/username/ta-lib/talib/__init__.py' |
ok, thank u for your help @mrjbq7 , definitely it´s the first way with the "system" install. I´ve tried in both terminals: original anaconda prompt and visual studio anaconda integrated prompt (where I usually code and try out my scripts). So, how can I fix that import error from the scripts written when I use visual studio code? |
This is really curious:
The thing is that VSCode is giving me error saying: E1101:Module 'talib' has no 'RSI' member. But when I use my command prompt Anaconda in VSCode and run: python printPair.py IS RUNNING and calculating the array rsi2 perfectly! I am comparing the values given from talib with a rsi function "hand-made" and the values are the same. So this is really weird. Maybe it is VSCode python interpreter fault? or something like that? Maybe python interpreter from VSCode is using a "loading from a git checkout"? and getting the wrong package? Because anaconda prompt is running ok! @mrjbq7 |
I'm not sure how your VSCode is setup, but maybe if you print out: >>> import sys
>>> sys.path You can see where the code is being loaded from... |
conda install -c developer ta-lib |
conda install -c quantopian ta-lib |
Your solulion worked. Ran Admin anaconda prompt.... base) C:\WINDOWS\system32>conda install -c masdeseiscaracteres ta-lib Package Planenvironment location: C:\ProgramData\Anaconda3 added / updated specs: The following NEW packages will be INSTALLED:
The following packages will be UPDATED:
The following packages will be DOWNGRADED:
Proceed ([y]/n)? y Preparing transaction: done (base) C:\WINDOWS\system32> Nose test... C:\Users\GUEST1>nosetests -v talib Ran 26 tests in 0.050s and functions work in my jupyter notebook import pandas_datareader.data as web type(adjclose) #adjclose is numpy.ndarray Output below... |
happyHou, this is great, how do I create a new conda package for python 3.7? Any pointers appreciated. |
I tried it on Linux Ubuntu 16.04: Collecting package metadata (current_repodata.json): done PackagesNotFoundError: The following packages are not available from current channels:
Current channels:
To search for alternate channels that may provide the conda package you're
and use the search bar at the top of the page. |
what version of python are you using? It is not working on my 3.7. |
[Windows 10, 64 bit, Anaconda ]I am using windows 10 64bit, when I tried to install ta-lib faced similar issues however this youtube video([https://www.youtube.com/watch?v=VJyNArEU0ws&ab_channel=QuantAlpha]) solved all of my issues and now I am using ta-lib in my anaconda environment just fine. |
I'm on a Mac M1 Max with macOS Ventura 13.1. Channels that I have tried:
But I always get the same:
|
I have tried use the following to install the ta-lib in Anaconda:
...
conda install -c quantopian ta-lib
...
But I get message as follow:
Fetching package metadata .............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
Use "conda info " to see the dependencies for each package.
How to do?
The text was updated successfully, but these errors were encountered: