Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cython not found..Please install it error in buildozer

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.        
like image 231
Hirdeyjeet Avatar asked Apr 06 '21 17:04

Hirdeyjeet


Video Answer


2 Answers

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
like image 168
Federico Vidoli Avatar answered Oct 19 '22 06:10

Federico Vidoli


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    
like image 32
Andrea Gelmini Avatar answered Oct 19 '22 07:10

Andrea Gelmini