0

I was trying to install TA-lib with pip, I have encountered an error saying that only Microsoft Visual C++ 14.0 or greater is supported, I downloaded and installed the build tools 2022 from the official Microsoft website, now I encountered another error.

C:\Users\DELL\Documents\Python\Binance> pip install TA-lib
Collecting TA-lib
  Using cached TA-Lib-0.4.27.tar.gz (266 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy (from TA-lib)
  Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/b7/db/4d37359e2c9cf8bf071c08b8a6f7374648a5ab2e76e2e22e3b808f81d507/numpy-1.25.2-cp310-cp310-win_amd64.whl.metadata
  Using cached numpy-1.25.2-cp310-cp310-win_amd64.whl.metadata (5.7 kB)
Using cached numpy-1.25.2-cp310-cp310-win_amd64.whl (15.6 MB)
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
  ╰─> [20 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-310
      creating build\lib.win-amd64-cpython-310\talib
      copying talib\abstract.py -> build\lib.win-amd64-cpython-310\talib
      copying talib\deprecated.py -> build\lib.win-amd64-cpython-310\talib
      copying talib\stream.py -> build\lib.win-amd64-cpython-310\talib
      copying talib\__init__.py -> build\lib.win-amd64-cpython-310\talib
      running build_ext
      building 'talib._ta_lib' extension
      creating build\temp.win-amd64-cpython-310
      creating build\temp.win-amd64-cpython-310\Release
      creating build\temp.win-amd64-cpython-310\Release\talib
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic:\ta-lib\c\include -IC:\Users\DELL\AppData\Local\Temp\pip-build-env-kr4xlx27\normal\Lib\site-packages\numpy\core\include -IC:\Users\DELL\AppData\Local\Programs\Python\Python310\include -IC:\Users\DELL\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /Tctalib/_ta_lib.c /Fobuild\temp.win-amd64-cpython-310\Release\talib/_ta_lib.obj      _ta_lib.c
      C:\Users\DELL\AppData\Local\Programs\Python\Python310\include\pyconfig.h(59): fatal error C1083: Impossible d'ouvrir le fichier include : 'io.h' : No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2      [end of output]

I tried looking for the io.h file inorder to put it in the Python310/include , I was expecting it to be published by Microsoft but it doesn't seem to exist

273K
  • 29,503
  • 10
  • 41
  • 64
Yahia
  • 1
  • you are missing the Windows SDK that is installed from within Visual Studio .. – rasjani Aug 13 '23 at 14:40
  • @rasjani No. I installed everything and yet the error is the same. Can I just copy paste the io.h from somwhere else to the Python310/include folder ? – Yahia Aug 13 '23 at 14:57

0 Answers0