Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install pdfkit via python pip




pdfkit - Wkhtmltopdf python wrapper to convert html to pdf using the webkit rendering engine and qt, it belongs to Classifiers:

- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
- Programming Language :: Python :: 3.2
- Programming Language :: Python :: 3.3
- Programming Language :: Python :: 3.4
- Programming Language :: Python :: 3.5
- Programming Language :: Python :: 3.6
- Programming Language :: Python :: 3.7
- Programming Language :: Python :: 3.8
- Programming Language :: Python :: 3.9
- Topic :: Text Processing
- Topic :: Text Processing :: General
- Topic :: Text Processing :: Markup
- Topic :: Text Processing :: Markup :: HTML
- Topic :: Text Processing :: Markup :: XML
- Topic :: Utilities

When you know about this project and you want to new install pdfkit to support your project or you get trouble as ModuleNotFoundError: No module named "pdfkit" or ImportError: cannot import name "pdfkit" in your project, let follow this tutorial to install pdfkit



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_pdfkit_env

- Active the virtual environment

test_pdfkit_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_pdfkit_env

- Active the virtual environment

source test_pdfkit_env/bin/active


Step 2: OK, now, let flow below content to start the installation pdfkit

To install pdfkit on Windows(CMD):

py -m pip install pdfkit

To install pdfkit on Unix/macOs:

pip install pdfkit


Step 3: If you want to install a specific pdfkit version, add ==<pdfkit version> to the end command line

Example:

pip install pdfkit==0.2.3


Please see the version list below table:

VersionReleased dateCommand
pdfkit 1.0.02021-11-14T19:28:49Windows:

py -m pip install pdfkit==1.0.0

Unix/macOs:

pip install pdfkit==1.0.0

pdfkit 0.6.12017-01-09T15:44:16Windows:

py -m pip install pdfkit==0.6.1

Unix/macOs:

pip install pdfkit==0.6.1

pdfkit 0.6.02016-12-19T14:17:21Windows:

py -m pip install pdfkit==0.6.0

Unix/macOs:

pip install pdfkit==0.6.0

pdfkit 0.5.02014-11-22T19:41:05Windows:

py -m pip install pdfkit==0.5.0

Unix/macOs:

pip install pdfkit==0.5.0

pdfkit 0.4.12013-03-10T11:05:04Windows:

py -m pip install pdfkit==0.4.1

Unix/macOs:

pip install pdfkit==0.4.1

pdfkit 0.4.02013-03-09T13:07:30Windows:

py -m pip install pdfkit==0.4.0

Unix/macOs:

pip install pdfkit==0.4.0

pdfkit 0.3.02013-01-14T20:40:29Windows:

py -m pip install pdfkit==0.3.0

Unix/macOs:

pip install pdfkit==0.3.0

pdfkit 0.2.42013-01-08T10:07:29Windows:

py -m pip install pdfkit==0.2.4

Unix/macOs:

pip install pdfkit==0.2.4

pdfkit 0.2.32013-01-08T09:34:36Windows:

py -m pip install pdfkit==0.2.3

Unix/macOs:

pip install pdfkit==0.2.3


Step 4: Otherwise, you can install pdfkit from local archives:

Download the distribution file from pdfkit-1.0.0.tar.gz or the specific pdfkit version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_pdfkit_downloaded_file>

On Unix/macOs:

pip install <path_to_pdfkit_downloaded_file>


List distribution:


Project link:

- Download