pythonpippython-wheelta-lib

Install TA-lib issue || .whl is not a valid wheel filename, || looks like a filename, but the file does not exist


I am having trouble installing a wheel file via pip.

I am using Windows 11 and my python version : 3.12.0 I downloaded "TA_Lib-0.4.24-cp310-cp310-cp310-win_amd64.whl" because I couldn't find the file in my version and I get an error when I try to install it.

I open my command prompt write the following in the prompt

C:\Users\Gokhan>pip install TA_Lib‑0.4.24‑cp310‑cp310‑win_amd64.whl

Then I get this message:

WARNING: Requirement 'TA_Lib‑0.4.24‑cp310‑cp310‑win_amd64.whl' looks like a filename, but the file does not exist
ERROR: TA_Lib‑0.4.24‑cp310‑cp310‑win_amd64.whl is not a valid wheel filename.

I don't know what to do, and I need your help.

I tried to do it by downloading many different versions, but I got the same error every time.

Then when I run "C:\Users\Gokhan>pip install ta-lib" in my terminal despite this error:

Collecting ta-lib
  Using cached TA-Lib-0.4.28.tar.gz (357 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in c:\users\türesin\anaconda3\lib\site-packages (from ta-lib) (1.24.3)
Building wheels for collected packages: ta-lib
  Building wheel for ta-lib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for ta-lib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      <string>:77: UserWarning: Cannot find ta-lib library, installation may fail.
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\talib
      copying talib\abstract.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\deprecated.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\stream.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\__init__.py -> build\lib.win-amd64-cpython-311\talib
      running build_ext
      building 'talib._ta_lib' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [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

I got this problem.


Solution

  • According to PyPi To use TA-Lib for python, you need to have the TA-Lib already installed. To install on your windows PC:

    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:

    For pip install TA-Lib, please note that the supported programming Languages are: Cython, Python 2.7, 3.3 - 3.11. Your python version (3.12.0) is not currently supported. Please see PyPi for more information.