Cython 未找到..请在 buildozer 中安装它错误

Hir*_*eet 10 python android cython kivy buildozer

我试图在 Linux 中从推土机创建 apk 文件,但每次我收到此错误时都找不到 cython。虽然我尝试安装它,但我找到了整个互联网但没有得到答案。请帮助我。我是初学者
\n代码:

\n
(kali\xe3\x89\xbfkali)-[~/Desktop/KivyApp]\n\xe2\x94\x94\xe2\x94\x80$ buildozer android debug                                                               1 \xe2\xa8\xaf\n# Check configuration tokens\n# Ensure build layout\n# Check configuration tokens\n# Read available permissions from api-versions.xml\n# Preparing build\n# Check requirements for android\n# Run 'dpkg --version'\n# Cwd None\nDebian 'dpkg' package management program version 1.20.7.1 (amd64).\nThis is free software; see the GNU General Public License version 2 or\nlater for copying conditions. There is NO warranty.\n# Search for Git (git)\n#  -> found at /usr/bin/git\n# Search for Cython (cython)\n# Cython (cython) not found, please install it.\n                                                                                              \n\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x80(kali\xe3\x89\xbfkali)-[~/Desktop/KivyApp]\n\xe2\x94\x94\xe2\x94\x80$ sudo pip uninstall cython              1 \xe2\xa8\xaf\nFound existing installation: Cython 0.29.21\nERROR: Cannot uninstall 'Cython'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.        \n                                               \n\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x80(kali\xe3\x89\xbfkali)-[~/Desktop/KivyApp]\n\xe2\x94\x94\xe2\x94\x80$ sudo apt-get install Cython          100 \xe2\xa8\xaf\nReading package lists... Done\nBuilding dependency tree... Done\nReading state information... Done\nE: Unable to locate package Cython\n                                                    \n\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x80(kali\xe3\x89\xbfkali)-[~/Desktop/KivyApp]\n\xe2\x94\x94\xe2\x94\x80$ sudo apt-get install cython          100 \xe2\xa8\xaf\nReading package lists... Done\nBuilding dependency tree... Done\nReading state information... Done\nPackage cython is not available, but is referred to by another package.\nThis may mean that the package is missing, has been obsoleted, or\nis only available from another source\n\nE: Package 'cython' has no installation candidate\n                                               \n\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x80(kali\xe3\x89\xbfkali)-[~/Desktop/KivyApp]\n\xe2\x94\x94\xe2\x94\x80$ sudo pip uninstall cython            100 \xe2\xa8\xaf\nFound existing installation: Cython 0.29.21\nERROR: Cannot uninstall 'Cython'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.        \n
Run Code Online (Sandbox Code Playgroud)\n

小智 9

这是因为buildozer搜索cython,但实际命令是cython3。要解决此问题,您必须创建一个 cython 命令,将所有参数传递给 cython3。

在终端中写入

cd /bin/ && sudo gedit cython
Run Code Online (Sandbox Code Playgroud)

在弹出的编辑器中写入

cython3 $@
Run Code Online (Sandbox Code Playgroud)

这会将所有参数从 cython 传递到 cython3。保存文件并在终端中写入

sudo chmod 755 cython
Run Code Online (Sandbox Code Playgroud)

使其可执行。要测试它,只需编写

cython
Run Code Online (Sandbox Code Playgroud)

它应该具有相同的输出

cython3
Run Code Online (Sandbox Code Playgroud)


小智 7

更安全、更简单的方法(这样可以避免转义参数等问题)是创建软链接

sudo ln -s /usr/bin/cython3 /usr/local/bin/cython    
Run Code Online (Sandbox Code Playgroud)