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 PyPI (Recommended)
The easiest way to install promptprep is from PyPI using pip:
pip install promptprep
This will install the latest stable version of promptprep and its required dependencies.
From Homebrew (macOS)
If you are on macOS, you can install promptprep using Homebrew. This method uses a custom “tap” repository.
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
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:
Clone the repository:
git clone https://github.com/kartikmandar/promptprep.git cd promptprep
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:
Ensure you have the latest version of pip:
pip install --upgrade pip
If you’re using a virtual environment, make sure it’s activated.
On some systems, you might need to use pip3 instead of pip.
If you encounter permission errors, try using:
pip install --user promptprep
For any other issues, please check the Troubleshooting section or open an issue on the GitHub repository.