The Wayback Machine - https://web.archive.org/web/20240126233621/https://www.geeksforgeeks.org/how-to-install-gd-module-on-linux/
Open In App
Related Articles

How to Install GD module on Linux?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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.

Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Looking for a place to share your ideas, learn, and connect? Our Community portal is just the spot! Come join us and see what all the buzz is about!


Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 09 Jun, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials