typedast的构建控制盘失败

2024-09-28 21:10:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我希望你做得很好

我的目标是通过使用以下脚本,从我的Synology NAS自动化Radarr的一些任务:https://github.com/linaspurinis/trakt.plex.scripts

(他们的工作是从trakt.tv获取一些经过筛选的电影列表,并将找到的电影自动添加到Radarr;例如,他们将查找本周观看的前10部电影,并将评级高于7且至少有100票的电影添加到Radarr中)

我从README.md开始执行了前两个步骤,并将脚本放在NAS上的/volume1/scripts/movies/trakt.plex.scripts master中,但在使用SSH执行第三个步骤(pip install-r requirements.txt)时出现python错误。以下是完整的输出:

superadmin@diskstation:/volume1/scripts/movies/trakt.plex.scripts-master$ sudo /volume1/@appstore/py3k/usr/local/bin/pip3 install -r requirements.txt
Password:
Collecting astroid==2.3.2
  Using cached astroid-2.3.2-py3-none-any.whl (205 kB)
Collecting certifi==2019.9.11
  Using cached certifi-2019.9.11-py2.py3-none-any.whl (154 kB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna==2.8
  Using cached idna-2.8-py2.py3-none-any.whl (58 kB)
Collecting isort==4.3.21
  Using cached isort-4.3.21-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: lazy-object-proxy==1.4.2 in /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages (from -r requirements.txt (line 6)) (1.4.2)
Collecting mccabe==0.6.1
  Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting oauthlib==3.1.0
  Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Processing /root/.cache/pip/wheels/03/22/4e/8993c46d8cbb81c71115a39595162be5ff7193c1810afd4ce2/PlexAPI-3.2.0-py3-none-any.whl
Collecting pylint==2.4.3
  Using cached pylint-2.4.3-py3-none-any.whl (302 kB)
Collecting python-dotenv==0.10.3
  Using cached python_dotenv-0.10.3-py2.py3-none-any.whl (16 kB)
Collecting requests==2.22.0
  Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB)
Collecting requests-cache==0.5.2
  Using cached requests_cache-0.5.2-py2.py3-none-any.whl (22 kB)
Collecting requests-oauthlib==1.2.0
  Using cached requests_oauthlib-1.2.0-py2.py3-none-any.whl (22 kB)
Requirement already satisfied: six==1.12.0 in /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages (from -r requirements.txt (line 15)) (1.12.0)
Collecting tqdm==4.36.1
  Using cached tqdm-4.36.1-py2.py3-none-any.whl (52 kB)
Processing /root/.cache/pip/wheels/aa/54/98/934d5f354a3a0e8a74332d5a53db29dd8421938f3394ddeb4e/trakt-2.11.0-py3-none-any.whl
Collecting typed-ast==1.4.0
  Using cached typed_ast-1.4.0.tar.gz (206 kB)
Collecting urllib3==1.25.6
  Using cached urllib3-1.25.6-py2.py3-none-any.whl (125 kB)
Collecting websocket-client==0.56.0
  Using cached websocket_client-0.56.0-py2.py3-none-any.whl (200 kB)
Requirement already satisfied: wrapt==1.11.2 in /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages (from -r requirements.txt (line 21)) (1.11.2)
Collecting beautifulsoup4==4.9.0
  Using cached beautifulsoup4-4.9.0-py3-none-any.whl (109 kB)
Collecting soupsieve>1.2
  Using cached soupsieve-2.0.1-py3-none-any.whl (32 kB)
Building wheels for collected packages: typed-ast
  Building wheel for typed-ast (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-aq7ds8gk
       cwd: /tmp/pip-install-rpek9gmd/typed-ast/
  Complete output (23 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-aarch64-3.5
  creating build/lib.linux-aarch64-3.5/typed_ast
  copying typed_ast/conversions.py -> build/lib.linux-aarch64-3.5/typed_ast
  copying typed_ast/ast3.py -> build/lib.linux-aarch64-3.5/typed_ast
  copying typed_ast/ast27.py -> build/lib.linux-aarch64-3.5/typed_ast
  copying typed_ast/__init__.py -> build/lib.linux-aarch64-3.5/typed_ast
  package init file 'ast3/tests/__init__.py' not found (or not a regular file)
  creating build/lib.linux-aarch64-3.5/typed_ast/tests
  copying ast3/tests/test_basics.py -> build/lib.linux-aarch64-3.5/typed_ast/tests
  running build_ext
  building '_ast27' extension
  creating build/temp.linux-aarch64-3.5
  creating build/temp.linux-aarch64-3.5/ast27
  creating build/temp.linux-aarch64-3.5/ast27/Parser
  creating build/temp.linux-aarch64-3.5/ast27/Python
  creating build/temp.linux-aarch64-3.5/ast27/Custom
  /usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYNO_FIX_FLAG_BUG -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -DSYNOPLAT_F_ARMV8 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -DSDK_VER_MIN_REQUIRED=600 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -Iast27/Include -I/volume1/@appstore/py3k/usr/local/include/python3.5m -c ast27/Parser/acceler.c -o build/temp.linux-aarch64-3.5/ast27/Parser/acceler.o
  unable to execute '/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc': No such file or directory
  error: command '/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for typed-ast
  Running setup.py clean for typed-ast
Failed to build typed-ast
Installing collected packages: typed-ast, astroid, certifi, chardet, idna, isort, mccabe, oauthlib, tqdm, websocket-client, urllib3, requests, PlexAPI, pylint, python-dotenv, requests-cache, requests-oauthlib, trakt, soupsieve, beautifulsoup4
    Running setup.py install for typed-ast ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-o2yyxpzp/install-record.txt --single-version-externally-managed --compile --install-headers /volume1/@appstore/py3k/usr/local/include/python3.5m/typed-ast
         cwd: /tmp/pip-install-rpek9gmd/typed-ast/
    Complete output (23 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-aarch64-3.5
    creating build/lib.linux-aarch64-3.5/typed_ast
    copying typed_ast/conversions.py -> build/lib.linux-aarch64-3.5/typed_ast
    copying typed_ast/ast3.py -> build/lib.linux-aarch64-3.5/typed_ast
    copying typed_ast/ast27.py -> build/lib.linux-aarch64-3.5/typed_ast
    copying typed_ast/__init__.py -> build/lib.linux-aarch64-3.5/typed_ast
    package init file 'ast3/tests/__init__.py' not found (or not a regular file)
    creating build/lib.linux-aarch64-3.5/typed_ast/tests
    copying ast3/tests/test_basics.py -> build/lib.linux-aarch64-3.5/typed_ast/tests
    running build_ext
    building '_ast27' extension
    creating build/temp.linux-aarch64-3.5
    creating build/temp.linux-aarch64-3.5/ast27
    creating build/temp.linux-aarch64-3.5/ast27/Parser
    creating build/temp.linux-aarch64-3.5/ast27/Python
    creating build/temp.linux-aarch64-3.5/ast27/Custom
    /usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSYNO_FIX_FLAG_BUG -DOPENSSL_NO_SSL3 -DOPENSSL_NO_SSL2 -DSYNOPLAT_F_ARMV8 -O2 -include /usr/syno/include/platformconfig.h -DSYNO_ENVIRONMENT -DBUILD_ARCH=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -DSDK_VER_MIN_REQUIRED=600 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -fPIC -Iast27/Include -I/volume1/@appstore/py3k/usr/local/include/python3.5m -c ast27/Parser/acceler.c -o build/temp.linux-aarch64-3.5/ast27/Parser/acceler.o
    unable to execute '/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc': No such file or directory
    error: command '/usr/local/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ccache-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rpek9gmd/typed-ast/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-o2yyxpzp/install-record.txt --single-version-externally-managed --compile --install-headers /volume1/@appstore/py3k/usr/local/include/python3.5m/typed-ast Check the logs for full command output.

我尝试使用pip而不是pip3,但该命令立即返回另一条错误消息

有人知道我如何解决这个问题吗

(我使用不支持Docker的Synology ds218play)

非常感谢您能提供的任何帮助


Tags: installpybuildnonelinuxlibusrpy3
2条回答

在使用python=3.9的conda环境中尝试pip install -r requirements.txt时,我收到了类似的错误消息。当我切换到conda环境时,my_env,使用python=3.8,然后安装需求工作正常:conda create -n my_env python=3.8

这似乎是一个版本问题。我手动安装了键入的\u ast:

pip3 install typed_ast

此安装版本为1.4.2

然后,我更新了requirements.txt以匹配:

typed-ast==1.4.2

在那之后,requirements.txt中的安装工作正常(不是我需要这样做,而是我想检查这个过程)

pip3 install -r requirements.txt

相关问题 更多 >