#python #docker
Вопрос:
Я разработал бота с использованием python и буду размещать этот скрипт на python с помощью docker. Я сделал необходимые шаги, но когда я пытаюсь создать docker, возникает проблема с библиотекой talib в python. в этом-то и заключается проблема…
#8 90.86 error: command '/usr/bin/gcc' failed with exit code 1
#8 90.86 ----------------------------------------
#8 90.86 Building wheel for jsonlib (setup.py): finished with status 'error'
#8 90.87 ERROR: Failed building wheel for jsonlib
#8 90.87 Running setup.py clean for jsonlib
#8 91.21 Building wheel for pathlib (setup.py): started
#8 92.04 Building wheel for pathlib (setup.py): finished with status 'done'
#8 92.04 Created wheel for pathlib: filename=pathlib-1.0.1-py3-none-any.whl size=14362 sha256=35f4e9f20332224e26f19b26cf447ac1d5e49479dbc4fb3f387f477e226a83ed
#8 92.04 Stored in directory: /root/.cache/pip/wheels/58/e4/79/b72447132cbb865fd652d37c85cc4e0caba75da59bc3a0ee50
#8 92.05 Building wheel for typing (setup.py): started
#8 92.46 Building wheel for typing (setup.py): finished with status 'done'
#8 92.46 Created wheel for typing: filename=typing-3.7.4.3-py3-none-any.whl size=26324 sha256=6594efe893c911ff7e950ee0781e6e7e9a59684ce36e71f652f9e751964f116f
#8 92.46 Stored in directory: /root/.cache/pip/wheels/fa/17/1f/332799f975d1b2d7f9b3f33bbccf65031e794717d24432caee
#8 92.47 Successfully built pathlib typing
#8 92.47 Failed to build TA-Lib jsonlib
#8 93.31 Installing collected packages: six, pytz, pycparser, multidict, idna, yarl, urllib3, tzlocal, typing-extensions, regex, python-dateutil, charset-normalizer, chardet, cffi, certifi, attrs, async-timeout, zope.interface, websockets, ujson, txaio, requests, numpy, incremental, hyperlink, dateparser, cryptography, constantly, Automat, aiohttp, typing, twisted, TA-Lib, reltools, python-binance, pyOpenSSL, pathlib, jsonlib, datetime, autobahn
#8 110.3 Running setup.py install for TA-Lib: started
#8 111.5 Running setup.py install for TA-Lib: finished with status 'error'
#8 111.5 ERROR: Command errored out with exit status 1:
#8 111.5 command: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gfh0gqz1/ta-lib_abff1b6d85724c30ad707d2d72dd0f14/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gfh0gqz1/ta-lib_abff1b6d85724c30ad707d2d72dd0f14/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-h0u86sxf/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/TA-Lib
#8 111.5 cwd: /tmp/pip-install-gfh0gqz1/ta-lib_abff1b6d85724c30ad707d2d72dd0f14/
#8 111.5 Complete output (27 lines):
#8 111.5 /tmp/pip-install-gfh0gqz1/ta-lib_abff1b6d85724c30ad707d2d72dd0f14/setup.py:76: UserWarning: Cannot find ta-lib library, installation may fail.
#8 111.5 warnings.warn('Cannot find ta-lib library, installation may fail.')
#8 111.5 running install
#8 111.5 running build
#8 111.5 running build_py
#8 111.5 creating build
#8 111.5 creating build/lib.linux-x86_64-3.9
#8 111.5 creating build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/test_func.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/test_pandas.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/stream.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/abstract.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/deprecated.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/test_abstract.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/test_stream.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/test_data.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 copying talib/__init__.py -> build/lib.linux-x86_64-3.9/talib
#8 111.5 running build_ext
#8 111.5 building 'talib._ta_lib' extension
#8 111.5 creating build/temp.linux-x86_64-3.9
#8 111.5 creating build/temp.linux-x86_64-3.9/talib
#8 111.5 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/opt/homebrew/include -I/opt/homebrew/opt/ta-lib/include -I/usr/local/lib/python3.9/site-packages/numpy/core/include -I/usr/local/include/python3.9 -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.9/talib/_ta_lib.o
#8 111.5 talib/_ta_lib.c:613:10: fatal error: ta-lib/ta_defs.h: No such file or directory
#8 111.5 #include "ta-lib/ta_defs.h"
#8 111.5 ^~~~~~~~~~~~~~~~~~
#8 111.5 compilation terminated.
#8 111.5 error: command '/usr/bin/gcc' failed with exit code 1
#8 111.5 ----------------------------------------
#8 111.5 ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gfh0gqz1/ta-lib_abff1b6d85724c30ad707d2d72dd0f14/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gfh0gqz1/ta-lib_abff1b6d85724c30ad707d2d72dd0f14/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-h0u86sxf/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/TA-Lib Check the logs for full command output.
------
executor failed running [/bin/sh -c pip install -r kodlar.txt]: exit code: 1`enter code here`