Buildozer和Py4a无法使用kivy生成pysendfile

2024-10-04 11:28:45 发布

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

我正在尝试使用pysendfile模块作为我的代码,在笔记本电脑上运行良好。但是当我尝试使用buildozer android debug为android构建相同的程序时,它会抛出以下错误。我已经将requirements=pysendfile包含在我的buildozer.spec文件中。在

Failed building wheel for pysendfile
Running setup.py clean for pysendfile
Failed to build pysendfile
Installing collected packages: pysendfile
Running setup.py install for pysendfile: started
Running setup.py install for pysendfile: finished with status 'error'
Complete output from command /home/heman/kivy/mobile/.buildozer/venv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-EFXqLT/pysendfile/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-GvNKlz-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/heman/kivy/mobile/.buildozer/venv/include/site/python2.7/pysendfile --home=/tmp/tmputyngD:
running install
running build
running build_ext
building 'sendfile' extension
creating build
creating build/temp.linux-x86_64-2.7
/bin/false -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c sendfilemodule.c -o build/temp.linux-x86_64-2.7/sendfilemodule.o
error: command '/bin/false' failed with exit status 1

----------------------------------------
Command "/home/heman/kivy/mobile/.buildozer/venv/bin/python2.7 -u -c"
import setuptools, tokenize;__file__='/tmp/pip-build EFXqLT/pysendfile/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-GvNKlz-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/heman/kivy/mobile/.buildozer/venv/include/site/python2.7/pysendfile --home=/tmp/tmputyngD" failed with error code 1 in /tmp/pip-build-EFXqLT/pysendfile/
Command failed: pip install --target=/home/heman/kivy/mobile/.buildozer/applibs pysendfile

Buildozer failed to execute the last command
The error might be hidden in the log above this error
Please read the full log, and search for it before
raising an issue with buildozer itself.
In case of a bug report, please add a full log with log_level = 2

编辑:这是我的食谱

^{pr2}$

Tags: installpippybuildhomeforwithsetup
1条回答
网友
1楼 · 发布于 2024-10-04 11:28:45

显然,pysend的编译过程中没有涉及到pysend的编译过程。现在pythonforandroid试图用pip安装它,但是失败了,因为环境不是针对android设置的(相反,它被设置为失败,以便捕捉问题)。在

解决方案是向python中添加一个用于android的配方来进行编译。有一些关于这个here的信息。在

相关问题 更多 >