Open In App

How to Install py-gd module on MacOS?

Last Updated : 11 Feb, 2022
Improve
Improve
Like Article
Like
Save
Share
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 MacOS

Method 1: Using pip to install GD Package

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

Step 1: Install the latest version of Python3 in macOS.

Step 2: Check if pip and python are correctly installed or not with the help of the following command:

python3 –version

pip3 –version

Checking-python-and-pip-version

Step 3: Upgrade your pip to avoid errors during the installation process using the following command:

pip3 install –upgrade pip

Upgrading-pip-in-MacOS

Step 4:  To install GD using pip3 enter the following command in the terminal window:

pip3 install gd.py

Installing-GD-package-using-pip

Method 2: Using setup.py to install GD package

Follow the below steps to install the GD package on macOS 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

Step 2: After downloading now we extract the downloaded package with the help of the given command:

tar -xzvf gd.tar.gz

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

Step 3: Now go to the downloaded folder and enter the following command to install the GD package.

cd gd.py-0.11.0

python3 setup.py install

Installing-GD-using-the-setup.py-file

Note: You must have developer tools for XCode MacOS installed in your system

Verifying GD installation on macOS 

To verify the GD installation, we import the GD package in the Python terminal:

import gd

Verifying-GD-installation-on-MacOS

If you get any error while importing the GD module then is not installed properly in your system.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads