[GH-ISSUE #105] Ubuntu 18.04 Installation #83

Closed
opened 2026-02-25 21:31:10 +03:00 by kerem · 8 comments
Owner

Originally created by @mharald on GitHub (Sep 2, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/105

Hello,

I´m trying to install in 18.04. Is this possible?

Here are the errors I am getting, when following your installation instructions:

  1. (short way) the base requirements can not be met:
xxxxx@xxxxx:/xxxxxx/papermergedms# python3 -m venv .venv --system-site-packages
xxxxx@xxxxx:/xxxxxx/papermergedms# source .venv/bin/activate
(.venv) xxxxx@xxxxx:/xxxxxx/papermergedms# pip3 install -r requirements/base.txt
Collecting mglib==1.2.7 (from -r requirements/base.txt (line 1))
  Could not find a version that satisfies the requirement mglib==1.2.7 (from -r requirements/base.txt (line 1)) (from versions: 1.0.0, 1.0.1)
No matching distribution found for mglib==1.2.7 (from -r requirements/base.txt (line 1))
(.venv) xxxxx@xxxxx:/xxxxxx/papermergedms#

  1. (Detailed Version) Version not matching:
# python3 --version
Python 3.6.9
# pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
  1. Small issue: On 18.04 there is no pdftk. Any ideas?
xxxxx@xxxxx:/home/xxxxx# sudo apt install build-essential \
>     python3-pip \
>     python3-venv \
>     git \
>     imagemagick \
>     poppler-utils \
>     pdftk \
>     tesseract-ocr \
>     tesseract-ocr-eng \
>     tesseract-ocr-deu \
>     tesseract-ocr-fra \
>     tesseract-ocr-spa
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package pdftk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'pdftk' has no installation candidate
xxxxx@xxxxx:/home/xxxxx#

I am sure that your DMS is exactly what I am looking for my home. I´d love to get it up and running!

Kindest regards and thank you in advance,

Harald

Originally created by @mharald on GitHub (Sep 2, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/105 Hello, I´m trying to install in 18.04. Is this possible? Here are the errors I am getting, when following your installation instructions: 1) (short way) the base requirements can not be met: ``` xxxxx@xxxxx:/xxxxxx/papermergedms# python3 -m venv .venv --system-site-packages xxxxx@xxxxx:/xxxxxx/papermergedms# source .venv/bin/activate (.venv) xxxxx@xxxxx:/xxxxxx/papermergedms# pip3 install -r requirements/base.txt Collecting mglib==1.2.7 (from -r requirements/base.txt (line 1)) Could not find a version that satisfies the requirement mglib==1.2.7 (from -r requirements/base.txt (line 1)) (from versions: 1.0.0, 1.0.1) No matching distribution found for mglib==1.2.7 (from -r requirements/base.txt (line 1)) (.venv) xxxxx@xxxxx:/xxxxxx/papermergedms# ``` 2) (Detailed Version) Version not matching: ``` # python3 --version Python 3.6.9 # pip3 --version pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6) ``` 3) Small issue: On 18.04 there is no pdftk. Any ideas? ``` xxxxx@xxxxx:/home/xxxxx# sudo apt install build-essential \ > python3-pip \ > python3-venv \ > git \ > imagemagick \ > poppler-utils \ > pdftk \ > tesseract-ocr \ > tesseract-ocr-eng \ > tesseract-ocr-deu \ > tesseract-ocr-fra \ > tesseract-ocr-spa Reading package lists... Done Building dependency tree Reading state information... Done Package pdftk is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'pdftk' has no installation candidate xxxxx@xxxxx:/home/xxxxx# ``` I am sure that your DMS is exactly what I am looking for my home. I´d love to get it up and running! Kindest regards and thank you in advance, Harald
kerem closed this issue 2026-02-25 21:31:10 +03:00
Author
Owner

@mtonnie commented on GitHub (Sep 2, 2020):

Hey Harald,

you can replace pdftk by stapler (pure python) and use a script to translate arguments.
Inhaber done this for Synology package as well.

<!-- gh-comment-id:685684055 --> @mtonnie commented on GitHub (Sep 2, 2020): Hey Harald, you can replace pdftk by stapler (pure python) and use a script to translate arguments. Inhaber done this for Synology package as well.
Author
Owner

@ciur commented on GitHub (Sep 2, 2020):

Hi @mharald, you need to have python >= 3.7

Create python virtual environment using virtualenv and provide python interpreter version as argument

virtualenv .venv -p python3.7

Python error is little bit confusing. mglib==1.2.7 is there available in pypi but it has set python version >= 3.7. Because you use python 3.6 pip tells you, confusingly enough, "no distribution found".

I updated the documentation today :

Screenshot from 2020-09-02 14-11-27

<!-- gh-comment-id:685691851 --> @ciur commented on GitHub (Sep 2, 2020): Hi @mharald, you need to have python >= 3.7 Create python virtual environment using virtualenv and provide python interpreter version as argument ``` virtualenv .venv -p python3.7 ``` Python error is little bit confusing. mglib==1.2.7 is there available in pypi but it has set python version >= 3.7. Because you use python 3.6 pip tells you, confusingly enough, "no distribution found". I updated the [documentation today](https://papermerge.readthedocs.io/en/latest/setup/manual_way.html#step-2-python-virtual-environment) : ![Screenshot from 2020-09-02 14-11-27](https://user-images.githubusercontent.com/24827601/91979692-6bb84500-ed26-11ea-96a5-110ee3c138ac.png)
Author
Owner

@ciur commented on GitHub (Sep 2, 2020):

@mharald, regarding pdftk error. It is because in Ubuntu 18.04 method of installing pdftk is little bit different (pdftk package was introduced in ubuntu 19... or 20 I think).

Try to install pdftk using this method for example. Or just google it, I am sure you will find the answer.
Just don't forget to include correct path of pdftk in your papermerge.conf.py configuration file:

$ cat papermerge.conf.py
  
 BINARY_PDFTK = "/snap/bin/pdftk"  # on Ubuntu 20.04;

Use:

$ which pdftk

command to figure out corret path to pdftk binary.
Here are all binary dependencies settings.

<!-- gh-comment-id:685698140 --> @ciur commented on GitHub (Sep 2, 2020): @mharald, regarding pdftk error. It is because in Ubuntu 18.04 method of installing pdftk is little bit different (pdftk package was introduced in ubuntu 19... or 20 I think). Try to install pdftk [using this method for example](https://linuxhint.com/install_pdftk_ubuntu/). Or just google it, I am sure you will find the answer. Just don't forget to include correct path of pdftk in your papermerge.conf.py configuration file: ``` $ cat papermerge.conf.py BINARY_PDFTK = "/snap/bin/pdftk" # on Ubuntu 20.04; ``` Use: ``` $ which pdftk ``` command to figure out corret path to pdftk binary. Here are all [binary dependencies settings](https://papermerge.readthedocs.io/en/latest/settings.html#binary-dependencies).
Author
Owner

@mharald commented on GitHub (Sep 2, 2020):

Hello,

Thank you for the fast reply.

I tried giving the version as a parameter. Here is the output:

xxxxx@xxxxx:/home/xxxxx# cd /xxxxx/papermergedms/
xxxxx@xxxxx:/xxxxx/papermergedms# virtualenv .venv -p python3.7
The path python3.7 (from --python=python3.7) does not exist

xxxxx@xxxxx:/xxxxx/papermergedms# virtualenv .venv -p python3.6.9
The path python3.6.9 (from --python=python3.6.9) does not exist

xxxxx@xxxxx:/xxxxx/papermergedms# virtualenv .venv -p python3.6
Running virtualenv with interpreter /usr/bin/python3.6
Using base prefix '/usr'
New python executable in /xxxxx/papermergedms/.venv/bin/python3.6
Not overwriting existing python script /xxxxx/papermergedms/.venv/bin/python (you must use /xxxxx/papermergedms/.venv/bin/python3.6)
Installing setuptools, pkg_resources, pip, wheel...done.
Overwriting /xxxxx/papermergedms/.venv/bin/activate with new content
Overwriting /xxxxx/papermergedms/.venv/bin/activate.fish with new content
Overwriting /xxxxx/papermergedms/.venv/bin/activate.csh with new content

Kindest regards,

Harald

<!-- gh-comment-id:685699370 --> @mharald commented on GitHub (Sep 2, 2020): Hello, Thank you for the fast reply. I tried giving the version as a parameter. Here is the output: ``` xxxxx@xxxxx:/home/xxxxx# cd /xxxxx/papermergedms/ xxxxx@xxxxx:/xxxxx/papermergedms# virtualenv .venv -p python3.7 The path python3.7 (from --python=python3.7) does not exist xxxxx@xxxxx:/xxxxx/papermergedms# virtualenv .venv -p python3.6.9 The path python3.6.9 (from --python=python3.6.9) does not exist xxxxx@xxxxx:/xxxxx/papermergedms# virtualenv .venv -p python3.6 Running virtualenv with interpreter /usr/bin/python3.6 Using base prefix '/usr' New python executable in /xxxxx/papermergedms/.venv/bin/python3.6 Not overwriting existing python script /xxxxx/papermergedms/.venv/bin/python (you must use /xxxxx/papermergedms/.venv/bin/python3.6) Installing setuptools, pkg_resources, pip, wheel...done. Overwriting /xxxxx/papermergedms/.venv/bin/activate with new content Overwriting /xxxxx/papermergedms/.venv/bin/activate.fish with new content Overwriting /xxxxx/papermergedms/.venv/bin/activate.csh with new content ``` Kindest regards, Harald
Author
Owner

@ciur commented on GitHub (Sep 2, 2020):

@harald

try to install python3.7 using this method or this one

Disclaimer: I just googled "install python 3.7 on ubuntu 18.04" :))
The command:

$ virtualenv .venv -p <python interpreter>

Will install in virtual environment mentioned version only if that python version is available on your system. You have only 3.6

<!-- gh-comment-id:685701743 --> @ciur commented on GitHub (Sep 2, 2020): @harald try to install python3.7 using [this method](https://linuxize.com/post/how-to-install-python-3-7-on-ubuntu-18-04/) or [this one](http://ubuntuhandbook.org/index.php/2019/02/install-python-3-7-ubuntu-18-04/) Disclaimer: I just googled "install python 3.7 on ubuntu 18.04" :)) The command: ``` $ virtualenv .venv -p <python interpreter> ``` Will install in virtual environment mentioned version *only if that python version is available on your system*. You have only 3.6
Author
Owner

@ciur commented on GitHub (Sep 2, 2020):

@mtonnie which stapler application you exactly mean? This one?

<!-- gh-comment-id:685703948 --> @ciur commented on GitHub (Sep 2, 2020): @mtonnie which **stapler** application you exactly mean? [This one](https://pypi.org/project/stapler/)?
Author
Owner

@mtonnie commented on GitHub (Sep 2, 2020):

@mtonnie which stapler application you exactly mean? This one?

Yes, exactly this one. I'm using this wrapper to convert the arguments from pdftk to stapler.
I have decided to use this solution, because of the following two topics:

  • (cross) compiling pdftk is a nightmare
  • License might be difficult in case of redistribution
<!-- gh-comment-id:685716141 --> @mtonnie commented on GitHub (Sep 2, 2020): > @mtonnie which **stapler** application you exactly mean? [This one](https://pypi.org/project/stapler/)? Yes, exactly this one. I'm using this [wrapper](https://github.com/mtonnie/spksrc/blob/spk-papermerge/spk/papermerge/src/pdftk.sh) to convert the arguments from pdftk to stapler. I have decided to use this solution, because of the following two topics: - (cross) compiling pdftk is a nightmare - License might be difficult in case of redistribution
Author
Owner

@ciur commented on GitHub (Sep 2, 2020):

@mtonnie, hm, license is a very good argument :). I was concerned about pdftk license as well :)
I opened this ticket to keep a reminder for me to replace pdftk with staple (because of license).

<!-- gh-comment-id:685736031 --> @ciur commented on GitHub (Sep 2, 2020): @mtonnie, hm, license is a very good argument :). I was concerned about pdftk license as well :) I [opened this ticket](https://github.com/ciur/papermerge/issues/106) to keep a reminder for me to replace pdftk with [staple](https://pypi.org/project/stapler/) (because of license).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#83
No description provided.