File: installation.md

package info (click to toggle)
pypdf2 2.12.1-3%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 27,144 kB
  • sloc: python: 28,767; makefile: 119; sh: 2
file content (71 lines) | stat: -rw-r--r-- 1,718 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Installation

There are several ways to install PyPDF2. The most common option is to use pip.

## pip

PyPDF2 requires Python 3.6+ to run.

Typically Python comes with `pip`, a package installer. Using it you can
install PyPDF2:

```bash
pip install PyPDF2
```

If you are not a super-user (a system administrator / root), you can also just
install PyPDF2 for your current user:

```bash
pip install --user PyPDF2
```

### Optional dependencies

PyPDF2 tries to be as self-contained as possible, but for some tasks the amount
of work to properly maintain the code would be too high. This is especially the
case for cryptography and image formats.

If you simply want to install all optional dependencies, run:

```
pip install PyPDF2[full]
```

Alternatively, you can install just some:

If you plan to use PyPDF2 for encrypting or decrypting PDFs that use AES, you
will need to install some extra dependencies. Encryption using RC4 is supported
using the regular installation.

```
pip install PyPDF2[crypto]
```

If you plan to use image extraction, you need Pillow:

```
pip install PyPDF2[image]
```

## Python Version Support

| Python                 | 3.10 | 3.9 | 3.8 | 3.7 | 3.6 | 2.7 |
| ---------------------- | ---- | --- | --- | --- | --- | --- |
| PyPDF2>=2.0            | YES  | YES | YES | YES | YES |     |
| PyPDF2 1.20.0 - 1.28.4 | YES  | YES | YES | YES | YES | YES |
| PyPDF2 1.15.0 - 1.20.0 |      |     |     |     |     | YES |


## Anaconda

Anaconda users can [install PyPDF2 via conda-forge](https://anaconda.org/conda-forge/pypdf2).


## Development Version

In case you want to use the current version under development:

```bash
pip install git+https://github.com/py-pdf/PyPDF2.git
```