Setting Python packages in editable mode

Occasionally, during development, you may need to modify a Python package manually. One convenient way to do this is by cloning the package’s GitHub repository and installing it in editable mode.

Let’s walk through an example. In a recent lab project, I used the pdfplumber package and needed to make some custom modifications.

First, clone the repository into your local computer:

git clone https://github.com/jsvine/pdfplumber.git

Then move to the cloned repository:

cd pdfplumber

Install it in editable mode using:

pip install -e .
  • -e stands for editable
  • . tells pip to install the current directory

Leave a Reply

Your email address will not be published. Required fields are marked *