-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathremove_pymupdf.sh
More file actions
executable file
·36 lines (30 loc) · 981 Bytes
/
remove_pymupdf.sh
File metadata and controls
executable file
·36 lines (30 loc) · 981 Bytes
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
#!/bin/bash
# Script to completely remove PyMuPDF and install alternatives
echo "🧹 Removing PyMuPDF completely..."
# Uninstall PyMuPDF and related packages
pip uninstall -y PyMuPDF pymupdf4llm fitz || true
# Install PDF processing alternatives
echo "📦 Installing PDF processing alternatives..."
pip install pypdf==4.0.1 pdfplumber==0.10.3 PyPDF2==3.0.1
# Verify PyMuPDF is gone
echo "🔍 Verifying PyMuPDF is removed..."
if python -c "import fitz" 2>/dev/null; then
echo "❌ PyMuPDF is still installed!"
exit 1
else
echo "✅ PyMuPDF successfully removed"
fi
# Test PDF processing
echo "🔍 Testing PDF processing with alternatives..."
python3 -c "
try:
import pypdf
import pdfplumber
import PyPDF2
print('✅ PDF processing alternatives installed successfully')
print('📚 Available: pypdf, pdfplumber, PyPDF2')
except ImportError as e:
print(f'❌ Error: {e}')
exit(1)
"
echo "🎉 PyMuPDF removal completed successfully!"