Python TA-Lib install problems

后端 未结 10 1193
盖世英雄少女心
盖世英雄少女心 2020-12-31 19:55

Frustratingly having a lot of difficult installing the TA-Lib package in python.

https://pypi.python.org/pypi/TA-Lib

I have read through all the forum posts

相关标签:
10条回答
  • 2020-12-31 20:19

    Download ta-lib-0.4.0-msvc.zip from http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip and unzip to C:\ta-lib

    This is a 32-bit release. If you want to use 64-bit Python, you will need to build a 64-bit version of the library.

    Some unofficial (and unsupported) instructions for building on 64-bit Windows 10, here for reference:

    1. Download and Unzip ta-lib-0.4.0-msvc.zip

    2. Move the Unzipped Folder ta-lib to C:\

    3. Download and Install Visual Studio Community 2015 or 2017 - have to do the big install i'm afraid - no other way

    Remember to Select [Visual C++] Feature

    1. Build TA-Lib Library - From Windows Start Menu, Start [VS2015 x64 Native Tools Command Prompt]

    cd to C:\ta-lib\c\make\cdr\win32\msvc

    Build the Library by typing nmake

    1. Try installing ta-lib again from pip or pycharm etc...
    0 讨论(0)
  • From https://github.com/mrjbq7/ta-lib:

    'This typically means that it can't find the underlying TA-Lib library, a dependency which needs to be installed.'

    Install the underlying TA-Lib library first from here: https://www.ta-lib.org/hdr_dw.html

    I used the 'ta-lib-0.4.0-msvc.zip' one.

    Then download a whl file from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib

    I used the 'TA_Lib‑0.4.16‑cp35‑cp35m‑win_amd64.whl' one.

    I can not definitely remember but I think I lastly ran pip install TA-Lib as well

    0 讨论(0)
  • 2020-12-31 20:27

    I faced the same problems trying with Anaconda 5.1.0 and Python 3.6 via Visual Studio.

    The solution was to get a wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs, then install it via pip. You need to make sure the wheel matches your python version (in my case, 3.6).

    In Anaconda, I just opened a prompt, navigated to where the wheel was, and ran the following: python -m pip install TA_Lib-0.4.17-cp36-cp36m-win_amd64.whl

    For Visual Studio, it was more obtuse. Go to the Python Environments tab, choose 'Overview' in the dropdown, then `Open in PowerShell'. At that point, run the same command as for ANaconda above.

    0 讨论(0)
  • The following solved the issue I had installing ta-lib for Python:

    1.- OS: Windows 10 Python: 2.7, embedded in miniconda. Miniconda: 64 bits (https://conda.io/miniconda). PyCharm 2018.1.4 Community Edition (https://www.jetbrains.com/pycharm/).

    2.- You need to convert ta-lib to 64 bits. You can find it already converted in here: https://github.com/afnhsn/TA-Lib_x64 This site also tells you what to do, however there are several steps not included or confusing there that I am explaining here. It is important that you do not just unzip the file 'ta-lib x64.zip' at 'C:\'. Inside the zip file, there is a 'ta-lib' folder. This folder is the one that has to be in 'C:\'

    3.- From the same github account, download and execute C++ Build Tools ('en_visual_cpp_build_tools_2015_update_3_x86_x64_8923157.exe')

    4.- Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 You must download and install it, in case you don't already have it.

    5.- Inside your python environment, run "pip install ta-lib".

    This worked for me, I hope this info is useful for you.

    Note: At the time, there is no TA-lib developed for Python 3.x, that is why I used Python 2.7

    0 讨论(0)
提交回复
热议问题