How-to install Odoo 10 on Debian 9 or Ubuntu 16.04 LTS without python-pypdf dependency

Odoo 10 package still depends on the old Python PyPdf unmaintained package. That package is no more available in several distributions, notably Debian 9 (stretch) and Ubuntu since 16.04 LTS. It is replaced by the new PyPDF2 which claims to be fully compatible, but does not provide PyPdf  as a virtual package. Same situation with Odoo 8 and Odoo 9.

However, there is an easy workaround : create a fake python-pdf package and install python-pyPdf from Pipy (Python repository). All of this will be done as root.

  • install equivs to create fake packages and python-pip to install package from Python repository
  • run equivs-control python-pypdf, this will create and populate the file python-pypdf
  • edit the file (dot and space under Description are mandatory) like below
    Section: python
     Package: python-pypdf
     Version: 1.13
     Description: fake package to provide python-pypdf
     This package provide the dependency needed by Odoo. 
     python-pypdf2 replace python-pypdf, but while compatible, 
     does not provide python-pypdf
     python-pypdf will need to be installed with 
     "pip install pyPdf"
  • run equivs-build python-pypdf this will create the fake package python-pypdf_1.13_all.deb
  • install the package with dpkg -i python-pypdf_1.13_all.deb
  • run pip install pyPdf
  • restart Odoo