Installation

This page provides detailed instructions for installing promptprep on different platforms.

Prerequisites

Before installing promptprep, ensure you have the following:

  • Python 3.10 or higher

  • pip (Python package installer)

or * For Homebrew: macOS operating system or * For Conda: Anaconda or Miniconda installed

Installation Methods

From Homebrew (macOS)

If you are on macOS, you can install promptprep using Homebrew. This method uses a custom “tap” repository.

  1. Tap the Custom Repository: First, you need to tell Homebrew where to find the promptprep formula by “tapping” the repository. You only need to do this once:

    brew tap kartikmandar/promptprep
    
  2. Install promptprep: Once the tap is added, you can install promptprep like any other Homebrew package:

    brew install promptprep
    

Homebrew will handle installing Python 3.10+ if it’s not already available and manage the dependencies within an isolated environment.

From Source

If you want the latest development version or plan to contribute to the project, you can install from source:

  1. Clone the repository:

    git clone https://github.com/kartikmandar/promptprep.git
    cd promptprep
    
  2. Install the package:

    pip install .
    

    For development installation (changes to the code take effect immediately):

    pip install -e .
    

Optional Dependencies

promptprep has optional features that require additional dependencies:

Syntax Highlighting

For syntax highlighting in the output, install with the highlighting extra:

pip install promptprep[highlighting]

Or if installing from source:

pip install .[highlighting]

Development Tools

If you’re contributing to promptprep, install the development dependencies:

pip install promptprep[dev]

Or if installing from source:

pip install .[dev]

Documentation Tools

To build the documentation locally:

pip install promptprep[docs]

Or if installing from source:

pip install .[docs]

All Optional Dependencies

To install all optional dependencies:

pip install promptprep[all]

Or if installing from source:

pip install .[all]

Verifying Installation

After installation, verify that promptprep is installed correctly by running:

promptprep --version

This should display the version number of promptprep.

Upgrading

To upgrade to the latest version:

pip install --upgrade promptprep

Troubleshooting

If you encounter any issues during installation:

  1. Ensure you have the latest version of pip:

    pip install --upgrade pip
    
  2. If you’re using a virtual environment, make sure it’s activated.

  3. On some systems, you might need to use pip3 instead of pip.

  4. If you encounter permission errors, try using:

    pip install --user promptprep
    
  5. For any other issues, please check the Troubleshooting section or open an issue on the GitHub repository.