Cython not found..Please install it error in buildozer
Asked Answered
B

4

11

I am trying to create an apk file from bulldozer in Linux, but every time I receive this error that cython is not found. Although I tried installing it, I found the whole internet but didn't get the answer.Please help me. I am a beginner
The code:

(kali㉿kali)-[~/Desktop/KivyApp]
└─$ buildozer android debug                                                               1 ⨯
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.20.7.1 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
# Cython (cython) not found, please install it.
                                                                                              
┌──(kali㉿kali)-[~/Desktop/KivyApp]
└─$ sudo pip uninstall cython              1 ⨯
Found existing installation: Cython 0.29.21
ERROR: 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.        
                                               
┌──(kali㉿kali)-[~/Desktop/KivyApp]
└─$ sudo apt-get install Cython          100 ⨯
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package Cython
                                                    
┌──(kali㉿kali)-[~/Desktop/KivyApp]
└─$ sudo apt-get install cython          100 ⨯
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package cython is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'cython' has no installation candidate
                                               
┌──(kali㉿kali)-[~/Desktop/KivyApp]
└─$ sudo pip uninstall cython            100 ⨯
Found existing installation: Cython 0.29.21
ERROR: 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.        
Brenza answered 6/4, 2021 at 17:40 Comment(0)
V
10

This is because buildozer search cython, but the actual command is cython3. To solve this you have to create a cython command that passes all arguments to cython3.

Write in the terminal

cd /bin/ && sudo gedit cython

in the editor that will pop-up write

cython3 $@

this will pass all the arguments from cython to cython3. Save the file and write in the terminal

sudo chmod 755 cython

to make it executable. To test it simply write

cython

It should have the same output as

cython3
Vitreous answered 9/4, 2021 at 14:45 Comment(0)
A
8

Safer and simpler way (so you avoid problems with escaping arguments and so on), is to create a soft link

sudo ln -s /usr/bin/cython3 /usr/local/bin/cython    
Aphanite answered 1/11, 2021 at 7:39 Comment(0)
W
1

What worked for me is installing it through apt with apt install cython3, it worked perfectly after that.

if that command doesn't work just type cython into the terminal, and ubuntu will help you install it.

Waterish answered 17/9, 2023 at 0:30 Comment(0)
G
0

Another solution if you can't install cython in your terminal is to create a virtual environment and download cython there. After activating it buildozer will find it.

Goodson answered 22/5, 2023 at 20:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.