How To Install cython3 on Ubuntu
Posted on April 1, 2023  (Last modified on May 20, 2023 )
2 minutes • 422 words
Introduction
In this tutorial we learn how to install cython3
on Ubuntu.
What is cython3
cython3 is:
Cython is a language that makes writing C extensions for the Python language as easy as Python itself. Cython is based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.
The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code.
This makes Cython the ideal language for wrapping external C libraries, and for fast C modules that speed up the execution of Python code.
There are three methods to install cython3
on Ubuntu. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install cython3 Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install cython3
using apt-get
by running the following command:
sudo apt-get -y install cython3
Install cython3 Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install cython3
using apt
by running the following command:
sudo apt -y install cython3
Install cython3 Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install cython3
using aptitude
by running the following command:
sudo aptitude -y install cython3
How To Uninstall cython3 on Ubuntu
To uninstall only the cython3
package we can use the following command:
sudo apt-get remove cython3
Uninstall cython3 And Its Dependencies
To uninstall cython3
and its dependencies that are no longer needed by Ubuntu, we can use the command below:
sudo apt-get -y autoremove cython3
Remove cython3 Configurations and Data
To remove cython3
configuration and data from Ubuntu we can use the following command:
sudo apt-get -y purge cython3
Remove cython3 configuration, data, and all of its dependencies
We can use the following command to remove cython3
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge cython3
Dependencies
cython3 have the following dependencies:
References
Summary
In this tutorial we learn how to install cython3
package on Ubuntu using different package management tools: apt, apt-get and aptitude.