How to Install Peewee on MacOS using Python3?
Peewee is a small and straightforward ORM. It features a limited number of (yet expressive) concepts, making it simple to learn and use. It supports Python version 2.7+ and above that supports sqlite, mysql, postgresql, cockroachdb with plenty of extensions.
Installing Py-Peewee on MacOS
Method 1: Using pip to install Py-Peewee Package
Follow the below steps to install the Py-Peewee package on macOS using pip:
Step 1: Install the current version of Python3 in macOS.
Step 2: Check if pip3 and python3 are correctly installed in your system using the following commands:
python3 –version
pip3 –version
Step 3: Upgrade pip3 to avoid errors occurring during the installation process.
pip3 install –upgrade pip
Step 4: Enter the following command to install Py-Peewee using pip3.
pip3 install peewee
Method 2: Using setup.py to install Py-Peewee
Follow the below steps to install the Py-Peewee package on macOS using the setup.py file:
Step 1: Download the latest or current source package of Py-Peewee for python3 from here.
curl https://files.pythonhosted.org/packages/bc/02/7ad123e327bf339274f3ba407e747f23337c270bb25b94d7cc07fb0f52fc/peewee-3.14.8.tar.gz > peewee.tar.gz
Step 2: Extract the downloaded Py-Peewee package using the following command:
tar -xzvf peewee.tar.gz
Step 3: Go inside the peewee-3.14.8 folder and enter the following command to install the package.
cd peewee-3.14.8
python3 setup.py install
Note: You must require developer tools for XCode MacOS installed in your computer system.
Verifying Py-Peewee installation on macOS
Use the following import in your Python terminal to verify if the Py-Peewee installation has been done properly or not:
import peewee
If we do not get any error while importing the module then is not installed properly.
Contact Us