Open In App

How to Install Python docutils on MacOS?

Last Updated : 31 Jan, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Docutils is a system for converting documents into useful forms or meaningful formats like HTML, XML, and LaTeX. or we can say that it is an open-source text processing system. It supports reStructuredText as an input format, which is a simple, what-you-see-is-what-you-get textual markup grammar. It is written in Python language and supported by Python2 and above. The following sources have been added to the list of supported sources:

  • Files that can be used independently.
  • PEPs (Python Enhancement Proposals).

Installing docutils on MacOS

Method 1: Using pip to install docutils Package

To install the docutils package on macOS we have to follow the below steps:

Step 1: Install the latest or current version of Python3 in MacOS.

Step 2: Check if pip3 and python3 are correctly installed in your system using the given commands:

python3 –version

pip3 –version

Checking-the-version-of-pip3-and-python3

Step 3: Upgrade your pip to avoid errors during installation in your system using the given command.

pip3 install –upgrade pip

Upgrading-pip

Step 4: To install docutils using pip3 use the following command

pip3 install docutils 

Installing-docutils

Method 2: Using setup.py to install docutils Notebook

Follow the below steps to install the docutils Notebook package on macOS using the setup.py file:

Step 1: Download the latest or current source package of docutils Notebook for Python3 from here.

curl https://files.pythonhosted.org/packages/57/b1/b880503681ea1b64df05106fc7e3c4e3801736cf63deffc6fa7fc5404cf5/docutils-0.18.1.tar.gz > docutils-0.18.1.tar.gz

Download-the-source-package-of-docutils

Step 2: Extract the downloaded package using the given command.

tar -xzvf docutils-0.18.1.tar.gz

Extract-the-package

Step 3: Go inside the docutils-0.18.1 folder and enter the following command to install the package.

cd docutils-0.18.1

python3 setup.py install

Go-inside-the-docutils

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

Verifying docutils installation on macOS

To verify that the docutils module installs properly in macOS use the following import command in your python terminal. If there is any error occurred while importing the docutils module then is not installed properly.

import docutils 

Verifying-docutils-installation


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

Similar Reads