在Docker上安装Talib

发布于 2025-01-29 04:56:43 字数 1514 浏览 3 评论 0原文

FROM python:3
USER root

RUN apt-get update
RUN apt-get -y install locales && \
    localedef -f UTF-8 -i ja_JP ja_JP.UTF-8

RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \
  tar -xvzf ta-lib-0.4.0-src.tar.gz && \
  cd ta-lib/ && \
  ./configure --prefix=/usr && \
  make && \
  make install
RUN pip install TA-Lib
RUN rm -R ta-lib ta-lib-0.4.0-src.tar.gz

ENV LANG ja_JP.UTF-8
ENV LANGUAGE ja_JP:ja
ENV LC_ALL ja_JP.UTF-8
ENV TZ JST-9
ENV TERM xterm

ADD . /code
WORKDIR /code

RUN apt-get install -y vim less
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install -r requirements.txt
version: "3"
services:
  python3:
    restart: always
    build: .
    container_name: "binancepython3"
    working_dir: /root/
    tty: true
    volumes:
      - ./opt:/root/opt
pandas
requests
ccxt == 1.81.77

我正在尝试在Docker上安装Talib,但是我遇到了下面的错误,您能教我如何解决它吗?

问题是由环境引起的吗?我应该使用anaconda而不是python:3吗?

#7 3.276 configure: error: cannot guess build type; you must specify one
------
executor failed running [/bin/sh -c wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz &&   tar -xvzf ta-lib-0.4.0-src.tar.gz &&   cd ta-lib/ &&   ./configure --prefix=/usr &&   make &&   make install]: exit code: 1
ERROR: Service 'python3' failed to build : Build failed

FROM python:3
USER root

RUN apt-get update
RUN apt-get -y install locales && \
    localedef -f UTF-8 -i ja_JP ja_JP.UTF-8

RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \
  tar -xvzf ta-lib-0.4.0-src.tar.gz && \
  cd ta-lib/ && \
  ./configure --prefix=/usr && \
  make && \
  make install
RUN pip install TA-Lib
RUN rm -R ta-lib ta-lib-0.4.0-src.tar.gz

ENV LANG ja_JP.UTF-8
ENV LANGUAGE ja_JP:ja
ENV LC_ALL ja_JP.UTF-8
ENV TZ JST-9
ENV TERM xterm

ADD . /code
WORKDIR /code

RUN apt-get install -y vim less
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install -r requirements.txt
version: "3"
services:
  python3:
    restart: always
    build: .
    container_name: "binancepython3"
    working_dir: /root/
    tty: true
    volumes:
      - ./opt:/root/opt
pandas
requests
ccxt == 1.81.77

I'm trying to install talib on docker, but I got an error like below, could you teach me how to solve it?

Is the problem caused by the environment? Should I use anaconda instead of python:3?

#7 3.276 configure: error: cannot guess build type; you must specify one
------
executor failed running [/bin/sh -c wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz &&   tar -xvzf ta-lib-0.4.0-src.tar.gz &&   cd ta-lib/ &&   ./configure --prefix=/usr &&   make &&   make install]: exit code: 1
ERROR: Service 'python3' failed to build : Build failed

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陪你搞怪i 2025-02-05 04:56:43

添加:

./configure --build=aarch64-unknown-linux-gnu

更多信息: https://stackoverflow.com/a/68025766/1145929

add:

./configure --build=aarch64-unknown-linux-gnu

more info: https://stackoverflow.com/a/68025766/1145929

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文