Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

How to Install GD module on Linux?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

GD is a python library. It provides various features and an async-ready API wrapper for the geometry dash. It is easy to use. It is used to implement the geometry dash API and is also very handy to work with object-oriented design. 

Installing GD module on Linux

Method 1: Using pip to install GD Package

Follow the below steps to install the GD package on Linux using pip:

Step 1: Install the latest version of Python3 in the Linux system.

Step 2: Check if pip3 and python3 are correctly installed or not in your system with the help of the following command:

python3 --version
pip3 --version

Checking-python-and-pip-version-in-Linux

Step 3: Upgrade your pip to avoid errors during the installation process.

pip3 install --upgrade pip

Upgrading-pip-in-Linux

Step 4: Enter the following command to install GD using pip3.

pip3 install gd.py

installing-GD-package-on-Linux-using-pip

Method 2: Using setup.py to install GD package

Follow the below steps to install the GD package on Linux using the setup.py file:

Step 1: Download the latest source package of GD for python3 from here.

curl https://files.pythonhosted.org/packages/2b/31/34455ef4925b10bd75171127f4d467dec8894a89813620903613f19ed6c1/gd.py-0.11.0.tar.gz > gd.tar.gz

Downloading-the-source-package-for-GD

Step 2: Extract the downloaded gd package using the following command:

tar -xzvf gd.tar.gz

Extracting-the-gd.tar.gz-file-in-Linux

Step 3: Go inside the gd folder and Enter the following command to install the package.

cd gd.py-0.11.0

python3 setup.py install

installing-GD-on-Linux-using-the-setup.py-file

Verifying GD installation on Linux

Make the following import in your python terminal to verify if the installation has been done properly:

import gd

Verifying-GD-installation-on-Linux

If there is any error while importing the module then is not installed properly.

My Personal Notes arrow_drop_up
Last Updated : 09 Jun, 2022
Like Article
Save Article
Similar Reads