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

Issue installing TA-Lib on windows #643

Closed
TwoPrismsOneGround opened this issue Mar 29, 2024 · 10 comments
Closed

Issue installing TA-Lib on windows #643

TwoPrismsOneGround opened this issue Mar 29, 2024 · 10 comments

Comments

@TwoPrismsOneGround
Copy link

At first I got an error telling me to upgrade my C++ build tools which I did. Now my error appears to be that it fails to build the wheel during installation:

https://paste.pythondiscord.com/N7SQ

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Mar 29, 2024 via email

@TwoPrismsOneGround
Copy link
Author

TwoPrismsOneGround commented Mar 29, 2024

Collaborator

I did not do that, would that be "pip install TA-Lib C". I tried that command and got some things installed then got another error:

`pip install TA-Lib C
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
Collecting C
Downloading c-0.1.0-py3-none-any.whl.metadata (3.7 kB)
Requirement already satisfied: numpy in c:\users\alcor\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from TA-Lib) (1.26.4)
Collecting arrow==0.12.1 (from C)
Downloading arrow-0.12.1.tar.gz (65 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 kB 3.4 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting click==6.7 (from C)
Downloading click-6.7-py2.py3-none-any.whl.metadata (424 bytes)
Collecting ipython==7.2.0 (from C)
Downloading ipython-7.2.0-py3-none-any.whl.metadata (4.5 kB)
Collecting matplotlib==2.2.0 (from C)
Downloading matplotlib-2.2.0.tar.gz (37.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 37.2/37.2 MB 81.8 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [61 lines of output]
============================================================================
Edit setup.cfg to change the build options

  BUILDING MATPLOTLIB
              matplotlib: yes [2.2.0]
                  python: yes [3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023,
                          00:38:17) [MSC v.1929 64 bit (AMD64)]]
                platform: yes [win32]

  REQUIRED DEPENDENCIES AND EXTENSIONS
                   numpy: yes [version 1.26.4]
        install_requires: yes [handled by setuptools]
                  libagg: yes [pkg-config information for 'libagg' could not
                          be found. Using local copy.]
                freetype: no  [The C/C++ header for freetype
                          (freetype2\ft2build.h) could not be found.  You may
                          need to install the development package.]
                     png: no  [The C/C++ header for png (png.h) could not be
                          found.  You may need to install the development
                          package.]
                   qhull: yes [pkg-config information for 'libqhull' could not
                          be found. Using local copy.]

  OPTIONAL SUBPACKAGES
             sample_data: yes [installing]
                toolkits: yes [installing]
                   tests: no  [skipping due to configuration]
          toolkits_tests: no  [skipping due to configuration]

  OPTIONAL BACKEND EXTENSIONS
                  macosx: no  [Mac OS-X only]
                  qt5agg: no  [PySide2 not found; PyQt5 not found]
                  qt4agg: no  [PySide not found; PyQt4 not found]
                 gtk3agg: no  [Requires pygobject to be installed.]
               gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                  gtkagg: no  [Requires pygtk]
                   tkagg: yes [installing; run-time loading from Python Tcl /
                          Tk]
                   wxagg: no  [requires wxPython]
                     gtk: no  [Requires pygtk]
                     agg: yes [installing]
                   cairo: no  [cairocffi or pycairo not found]
               windowing: yes [installing]

  OPTIONAL LATEX DEPENDENCIES
                  dvipng: no
             ghostscript: no
                   latex: no
                 pdftops: no

  OPTIONAL PACKAGE DATA
                    dlls: no  [skipping due to configuration]

  ============================================================================
                          * The following required packages can not be built:
                          * freetype, png
                          * Please check http://gnuwin32.sourceforge.net/packa
                          * ges/freetype.htm for instructions to install
                          * freetype
                          * Please check http://gnuwin32.sourceforge.net/packa
                          * ges/libpng.htm for instructions to install png
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Mar 29, 2024 via email

@TwoPrismsOneGround
Copy link
Author

TwoPrismsOneGround commented Mar 29, 2024

Look at the README for platform instructions: https://github.com/ta-lib/ta-lib-python?tab=readme-ov-file#dependencies

I have followed those instructions to manually create a 64 bit version. on windows However when I run "nmake" I get countless lines of this:

_regtest\ta_test_func\test_per_ohlc.c test_per_ohlc.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_po.obj ..\..\..\..\..\src\tools\ta_regtest\ta_test_func\test_po.c test_po.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_rsi.obj ..\..\..\..\..\src\tools\ta_regtest\ta_test_func\test_rsi.c test_rsi.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_sar.obj ..\..\..\..\..\src\tools\ta_regtest\ta_test_func\test_sar.c test_sar.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_stddev.obj ..\..\..\..\..\src\tools\ta_regtest\ta_test_func\test_stddev.c test_stddev.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_stoch.obj ..\..\..\..\..\src\tools\ta_regtest\ta_test_func\test_stoch.c test_stoch.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_trange.obj ..\..\..\..\..\src\tools\ta_regtest\ta_test_func\test_trange.c test_trange.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_util.obj ..\..\..\..\..\src\tools\ta_regtest\test_util.c test_util.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_data.obj ..\..\..\..\..\src\tools\ta_regtest\test_data.c test_data.c cl -c -nologo -W3 -MD -O2 -DWIN32 -D_MBCS -D_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\..\src\ta_common" -I"..\..\..\..\..\src\tools\ta_regtest" -I"..\..\..\..\..\src\ta_func" -I"..\..\..\..\..\include" -Fo..\..\..\..\..\temp\cdr\test_abstract.obj ..\..\..\..\..\src\tools\ta_regtest\test_abstract.c test_abstract.c

Afterwards it still shows TA-Lib as not being installed when I check in vscode terminal.

EDIT: I was able to install an unsupported build here:

https://github.com/cgohlke/talib-build/

@italo013
Copy link

italo013 commented Apr 2, 2024

I'm with the same problem, install TA-Lib on windows. I have been follow these steps but return an error. Anyone know how to fix it?

image

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Apr 2, 2024 via email

@italo013
Copy link

italo013 commented Apr 2, 2024

I'm using the same terminal of the video

image

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Apr 2, 2024 via email

@italo013
Copy link

italo013 commented Apr 2, 2024

page not found

image

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Apr 2, 2024 via email

@mrjbq7 mrjbq7 closed this as completed May 23, 2024
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

3 participants