TA-Lib / ta-lib-python

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

currenty Ta-Lib install fails on all platforms; .....resolving dependencies #543

Closed 369Martin369 closed 7 months ago

369Martin369 commented 1 year ago

Replit: Updating package configuration

--> python3 -m poetry add talib-binary config requests Using version ^0.4.19 for talib-binary Using version ^0.5.1 for config Using version ^2.28.1 for requests

Updating dependencies Resolving dependencies...

Package operations: 1 install, 0 updates, 0 removals

• Installing talib-binary (0.4.19)

RuntimeError

Unable to find installation candidates for talib-binary (0.4.19)

at venv/lib/python3.8/site-packages/poetry/installation/chooser.py:72 in choose_for 68│ 69│ links.append(link) 70│ 71│ if not links: → 72│ raise RuntimeError( 73│ "Unable to find installation candidates for {}".format(package) 74│ ) 75│ 76│ # Get the best link

/home/runner/Compensationnetwork/venv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn(

Failed to add packages, reverting the pyproject.toml file to its original content. exit status 1

Replit: Package operation failed.

369Martin369 commented 1 year ago

Tried also local Anaconda....also dependencies error

trufanov-nok commented 1 year ago

Here I'm suggesting instructions on how to build the TA-Lib C library from sources under Replit:
https://stackoverflow.com/questions/73631645/ta-lib-replit-python-install-problem-error-no-matching-distribution-found-for/73648628

369Martin369 commented 1 year ago

Here I'm suggesting instructions on how to build the TA-Lib C library from sources under Replit: https://stackoverflow.com/questions/73631645/ta-lib-replit-python-install-problem-error-no-matching-distribution-found-for/73648628

hmm, I'm hanging at 3) at line "./configure"

~/Talib-Test/ta-lib$ ./configure bash: ./configure: No such file or directory ~/Talib-Test/ta-lib$

Any further idea for me? Thx

trufanov-nok commented 1 year ago

If ./configure doesn't exists then autoreconf --install should report error (it generates ./configure). Are there any?

369Martin369 commented 1 year ago

sorry, I don't get is. there are no further files... image

369Martin369 commented 1 year ago

I'm a poor windows guy and have no clue :-o. But I need Talib for a crypto Bot... here is Talib-test https://replit.com/@CompensationNetwork/Talib-Test#main.py

trufanov-nok commented 1 year ago

It should be autoreconf --install, not autoreconfig --install

369Martin369 commented 1 year ago

thanks.but....


~/Talib-Test$ cd ta-lib ~/Talib-Test/ta-lib$ autoreconf --install Can't exec "aclocal": No such file or directory at /nix/store/xn46q2dzx9wgk73bqahrqlajm2xi3n4k-autoconf-2.71/share/autoconf/Autom4te/FileUtils.pm line 275. autoreconf: error: aclocal failed with exit status: 2 ~/Talib-Test/ta-lib$

trufanov-nok commented 1 year ago

execute aclocal. Any errors?

trufanov-nok commented 1 year ago

aclocal should be a part of automake package. Check if you added it at step 2. Also you can list the content of your replit.nix file with cat ../replit.nix (from ta-lib folder) or cat replit.nix (if you are in a projects root folder). Paste it here - we'll doeblecheck which packages are installed.

369Martin369 commented 1 year ago

~/Talib-Test/ta-lib$ aclocal aclocal: command not installed. Multiple versions of this command were found in Nix. Select one to run (or press Ctrl-C to cancel): Adding automake to replit.nix error: Could not read file replit.nix /nix/store/ppilclv3vx3vp6zgazcrdgbidd3xz47y-automake-1.16.3 ~/Talib-Test/ta-lib$

369Martin369 commented 1 year ago

~/Talib-Test/ta-lib$ cat ../replit.nix { pkgs }: { deps = [ pkgs.autoconf pkgs.libtool pkgs.python38Full ]; env = { PYTHON_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [

Needed for pandas / numpy

  pkgs.stdenv.cc.cc.lib
  pkgs.zlib
  # Needed for pygame
  pkgs.glib
  # Needed for matplotlib
  pkgs.xorg.libX11
];
PYTHONBIN = "${pkgs.python38Full}/bin/python3.8";
LANG = "en_US.UTF-8";

}; }~/Talib-Test/ta-lib$

trufanov-nok commented 1 year ago

Yes, you lack automake and cmake packages from step 2.

~/Talib-Test/ta-lib$ aclocal aclocal: command not installed. Multiple versions of this command were found in Nix. Select one to run (or press Ctrl-C to cancel): Adding automake to replit.nix error: Could not read file replit.nix /nix/store/ppilclv3vx3vp6zgazcrdgbidd3xz47y-automake-1.16.3 ~/Talib-Test/ta-lib$

This is a case I mantioned in instructions: But if you're going to add such commands in a my way, note that you must execute them in Shell in your project root folder as replit.nix file is located in it. Otherwise Nix won't remember your choice.

So you must execute from a project's root folder. Not a ta-lib folder. Do cd .. and repeat.

369Martin369 commented 1 year ago

you are so patient with me, but I'm too stupid for this linux sh.... I give up., no crypto BOT for me online... 👎 https://replit.com/@CompensationNetwork/ZockerBOT#main.py

~/Talib-Test$ dir ltmain.sh main.py poetry.lock pyproject.toml replit.nix ta-lib venv ~/Talib-Test$ automake automake: command not installed. Multiple versions of this command were found in Nix. Select one to run (or press Ctrl-C to cancel): Adding automake to replit.nix success /nix/store/ppilclv3vx3vp6zgazcrdgbidd3xz47y-automake-1.16.3 automake: error: 'configure.ac' is required Detected change in environment, reloading shell... ~/Talib-Test$ cmake cmake: command not installed. Multiple versions of this command were found in Nix. Select one to run (or press Ctrl-C to cancel): Adding cmake to replit.nix success /nix/store/cbxqzxwlga5pm9rk8qa8fgv5387r540l-cmake-3.19.7 Usage

cmake [options] cmake [options] cmake [options] -S -B

Specify a source directory to (re-)generate a build system for it in the current working directory. Specify an existing build directory to re-generate its build system.

Run 'cmake --help' for more information.

Detected change in environment, reloading shell... ~/Talib-Test$

trufanov-nok commented 1 year ago

Ok, looks good. Now go to the ta-lib/ folder and perform "step 3" and so on.

mrjbq7 commented 1 year ago

Should we turn this into a guide somewhere?

On Tue, Sep 13, 2022 at 7:57 AM Alexander Trufanov @.***> wrote:

Ok, looks good. Now go to the ta-lib/ folder and perform "step 3" and so on.

— Reply to this email directly, view it on GitHub https://github.com/mrjbq7/ta-lib/issues/543#issuecomment-1245537762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A7ISW2JTUVI5YKIKKLV6CI4TANCNFSM6AAAAAAQLFKMCU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

trufanov-nok commented 1 year ago

@mrjbq7 Yes, but the instructions are just not yet finalized.

369Martin369 commented 1 year ago

we need a working install routine....and not more and more description

"pip install ta-lib" should be enough, and not this =§/"%"%%

mrjbq7 commented 1 year ago

Installing TA-Lib is typically simple following the instructions, except on Windows.

We may be able to distribute binary wheels, but those might have some numpy version complications too.

DaemonStark commented 1 year ago

Any update on this? I'm facing same issues on windows 10, python 3.10

mrjbq7 commented 1 year ago

@DaemonStark what is the same issue you are facing?

SomethingUseful commented 1 year ago

I had issues on Mac Big Sur until I reinstalled command line tools and updated clang ...

% sudo rm -rf /Library/Developer/CommandLineTools % sudo xcode-select --install % clang --version Apple clang version 12.0.5 (clang-1205.0.22.11)

THEN... $ pip3 install ta-lib Collecting ta-lib Using cached TA-Lib-0.4.25.tar.gz (271 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy in /usr/local/lib/python3.10/site-packages (from ta-lib) (1.24.0) Building wheels for collected packages: ta-lib Building wheel for ta-lib (pyproject.toml) ... done Created wheel for ta-lib: filename=TA_Lib-0.4.25-cp310-cp310-macosx_11_0_x86_64.whl size=450718 sha256=d793bcd939d8b4c43efa00359ae45207e18d5d622a3d794f8da1fef12279d23b Stored in directory: /Users/xxxxxx/Library/Caches/pip/wheels/ac/12/d0/2ea05cfb5b9c4bbf47b45dd93ff5baed86ddb85c748166cb6f Successfully built ta-lib Installing collected packages: ta-lib Successfully installed ta-lib-0.4.25

mrjbq7 commented 1 year ago

The original post at the top was about using poetry to install whatever talib-binary is, so I'm going to close this issue.

mrjbq7 commented 7 months ago

Closing old issue.