TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.49k stars 1.74k forks source link

Windows 11 - Unable to install #497

Closed MrFanciful closed 2 years ago

MrFanciful commented 2 years ago

Hi

I'm getting the error below when trying to install TA-Lib on Windows 11. I get this when installing in PyCharm or Windows Terminal, both running as administrator. I've updated Pip and ensure the Visual Studio runtimes are installed.

Collecting TA-Lib Using cached TA-Lib-0.4.24.tar.gz (269 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Requirement already satisfied: numpy in c:\users\user\onedrive\python\my_ml_algorithmic_trading\venv\lib\site-packages (from TA-Lib) (1.22.1) Building wheels for collected packages: TA-Lib Building wheel for TA-Lib (setup.py): started Building wheel for TA-Lib (setup.py): finished with status 'error' Running setup.py clean for TA-Lib Failed to build TA-Lib Installing collected packages: TA-Lib Running setup.py install for TA-Lib: started Running setup.py install for TA-Lib: finished with status 'error'

error: subprocess-exited-with-error

python setup.py bdist_wheel did not run successfully. exit code: 1

[12 lines of output] C:\Users\user\AppData\Local\Temp\pip-install-mnp1lc9a\ta-lib_1629c31f7c3c4764a88946dc91dc58c9\setup.py:77: 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 warning: build_py: byte-compiling is disabled, skipping.

running build_ext building 'talib._ta_lib' extension _ta_lib.c c:\users\user\appdata\local\programs\python\python39\include\pyconfig.h(200): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\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 error: subprocess-exited-with-error

Running setup.py install for TA-Lib did not run successfully. exit code: 1

[14 lines of output] C:\Users\user\AppData\Local\Temp\pip-install-mnp1lc9a\ta-lib_1629c31f7c3c4764a88946dc91dc58c9\setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail. warnings.warn('Cannot find ta-lib library, installation may fail.') running install C:\Users\user\OneDrive\Python\my_ml_algorithmic_trading\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py warning: build_py: byte-compiling is disabled, skipping.

running build_ext building 'talib._ta_lib' extension _ta_lib.c c:\users\user\appdata\local\programs\python\python39\include\pyconfig.h(200): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\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: legacy-install-failure

Encountered error while trying to install package.

TA-Lib

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

mrjbq7 commented 2 years ago
77: UserWarning: Cannot find ta-lib library, installation may fail.
mrjbq7 commented 2 years ago

You probably need that library!

mrjbq7 commented 2 years ago

https://github.com/mrjbq7/ta-lib#windows

MrFanciful commented 2 years ago

Thanks for the quick response...Worked perfectly.

Sunshengyi commented 2 years ago

I don't know