LeoFCardoso / pdf2pdfocr

A free tool to OCR a PDF and add a text "layer" in the original file, making a searchable PDF. Use only open source tools. Please tip!
Apache License 2.0
274 stars 35 forks source link

install script under linux is incomplete #50

Open nicoursi opened 4 days ago

nicoursi commented 4 days ago

The install script provided assumes on has already installed a venv environment. If this has not happened the script will fail with errors.

Here a more complete version

# 1. Create the virtual environment
python3 -m venv ~/pdf2pdfocr-venv

# 2. Activate the virtual environment
source ~/pdf2pdfocr-venv/bin/activate

# 3. Install any dependencies (if requirements.txt is available)
pip install -r requirements.txt

# 4. Copy Python files to the virtual environment bin directory
cp *.py ~/pdf2pdfocr-venv/bin/

# 5. Copy executables to /usr/local/bin
cp pdf2pdfocr pdf2pdfocr_gui /usr/local/bin