Python TA-Libがimport installができない。

実現したいこと

TA-Libをインストールし、インポートしたい。

前提

①Anacondaを入れました。
https://di-acc2.com/programming/python/15542/#index_id14
この記事の conda install -c conda-forge ta-lib を実行し、インストールはできたのですが
実際にimportしてみるとできません。
エラーコード

Traceback (most recent call last): File "<module3>", line 1, in <module> ModuleNotFoundError: No module named 'talib'


https://pypi.org/project/TA-Lib/
この記事から、
”””
Download ta-lib-0.4.0-msvc.zip and unzip to C:\ta-lib.

This is a 32-bit binary 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:

Download and Unzip ta-lib-0.4.0-msvc.zip
Move the Unzipped Folder ta-lib to C:
Download and Install Visual Studio Community (2015 or later)
Remember to Select [Visual C++] Feature
Build TA-Lib Library
From Windows Start Menu, Start [VS2015 x64 Native Tools Command Prompt]
Move to C:\ta-lib\c\make\cdr\win32\msvc
Build the Library nmake
”””
そして
python -m pip install TA-Lib

とやってみたのですが、ライブラリを構築する、というのがわからず、詰まっています。
エラーメッセージ

build\lib.win-amd64-cpython-311\talib\_ta_lib.cp311-win_amd64.pyd : fatal error LNK1120: 339 件の未解決の外部参照 error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for TA-Lib Failed to build TA-Lib ERROR: Could not build wheels for TA-Lib, which is required to install pyproject.toml-based projects

どうしたらTA-Libを使えるようになるでしょうか・・・

コメントを投稿

0 コメント