sadickam commited on
Commit
7a9d085
·
verified ·
1 Parent(s): fd9d1c5

Delete install_poppler.py

Browse files
Files changed (1) hide show
  1. install_poppler.py +0 -25
install_poppler.py DELETED
@@ -1,25 +0,0 @@
1
- import subprocess
2
-
3
- def install_poppler():
4
- """Install Poppler if not already installed."""
5
- try:
6
- # Check if poppler-utils is already installed
7
- result = subprocess.run(["pdftoppm", "-h"], capture_output=True, text=True)
8
- if result.returncode == 0:
9
- print("Poppler is already installed.")
10
- return
11
- except FileNotFoundError:
12
- print("Poppler not found. Proceeding with installation...")
13
-
14
- # Install Poppler for Linux-based systems (without sudo)
15
- try:
16
- print("Installing Poppler...")
17
- subprocess.run(["apt-get", "update"], check=True) # No sudo needed
18
- subprocess.run(["apt-get", "install", "-y", "poppler-utils"], check=True)
19
- print("Poppler installed successfully.")
20
- except subprocess.CalledProcessError as e:
21
- print(f"Failed to install Poppler: {e}")
22
-
23
- # Call the function to ensure Poppler is installed
24
- install_poppler()
25
-