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

Error in installing TA-Lib by "Could not build wheels for TA-Lib, which is required to install pyproject.toml-based projects" error #10

Open
rezapajhouhesh opened this issue Jun 27, 2023 · 0 comments

Comments

@rezapajhouhesh
Copy link

By installing TA_lib by pip instruction as following command:
pip install TA-Lib
the following result and error are produced, how to fix the problem?

Collecting TA-Lib
  Using cached TA-Lib-0.4.26.tar.gz (272 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\mahdizadeh\appdata\local\programs\python\python311\lib\site-packages (from TA-Lib) (1.24.1)
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
  ╰─> [26 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\test_abstract.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\test_data.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\test_func.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\test_pandas.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\test_polars.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\test_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
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\talib
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic:\ta-lib\c\include -IC:\Users\Mahdizadeh\AppData\Local\Temp\pip-build-env-tlw2ytdz\normal\Lib\site-packages\numpy\core\include -IC:\Users\Mahdizadeh\AppData\Local\Programs\Python\Python311\include -IC:\Users\Mahdizadeh\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tctalib/_ta_lib.c /Fobuild\temp.win-amd64-cpython-311\Release\talib/_ta_lib.obj
      _ta_lib.c
      talib/_ta_lib.c(745): fatal error C1083: Cannot open include file: 'ta_libc.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [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
PS C:\Users\Mahdizadeh> pip install wheel
Requirement already satisfied: wheel in c:\users\mahdizadeh\appdata\local\programs\python\python311\lib\site-packages (0.40.0)
PS C:\Users\Mahdizadeh> pip install TA-Lib==0.4.4   
ERROR: Could not find a version that satisfies the requirement TA-Lib==0.4.4 (from versions: 0.4.9, 0.4.14, 0.4.15, 0.4.16, 0.4.17, 0.4.18, 0.4.19, 0.4.20, 0.4.21, 0.4.22, 0.4.23, 0.4.24, 0.4.25, 0.4.26)
ERROR: No matching distribution found for TA-Lib==0.4.4
PS C:\Users\Mahdizadeh> pip install TA-Lib==0.4.14
Collecting TA-Lib==0.4.14
  Downloading TA-Lib-0.4.14.tar.gz (715 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 715.5/715.5 kB 922.0 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\mahdizadeh\appdata\local\programs\python\python311\lib\site-packages (from TA-Lib==0.4.14) (1.24.1)
Building wheels for collected packages: TA-Lib
  Building wheel for TA-Lib (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      C:\Users\Mahdizadeh\AppData\Local\Temp\pip-install-6xg4mhz3\ta-lib_2586b55e37fc4899ba48dc8348592a75\setup.py:82: UserWarning: Cannot find ta-lib library, installation may fail.
        warnings.warn('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\test_abstract.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\test_data.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\test_func.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\test_stream.py -> build\lib.win-amd64-cpython-311\talib
      copying talib\__init__.py -> build\lib.win-amd64-cpython-311\talib
      running build_ext
      skipping 'talib\_ta_lib.c' Cython extension (up-to-date)
      building 'talib._ta_lib' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\talib
      "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\Mahdizadeh\AppData\Local\Programs\Python\Python311\Lib\site-packages\numpy\core\include -Ic:\ta-lib\c\include -IC:\Users\Mahdizadeh\AppData\Local\Programs\Python\Python311\include -IC:\Users\Mahdizadeh\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tctalib\_ta_lib.c /Fobuild\temp.win-amd64-cpython-311\Release\talib\_ta_lib.obj
      _ta_lib.c
      talib\_ta_lib.c(181): fatal error C1083: Cannot open include file: 'longintrepr.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [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
  Running setup.py clean 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant