Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
18843 Weergaven

Hi there,

I am trying to install Odoo 9 by sources on Ubuntu 16.04.5 LTS but unfortunately when executing ./odoo-bin I receive following issue:

Traceback (most recent call last):

  File "./odoo-bin", line 5, in <module>

    import odoo

  File "/media/sf_git/source/odoo/odoo/__init__.py", line 89, in <module>

    from . import modules

  File "/media/sf_git/source/odoo/odoo/modules/__init__.py", line 8, in <module>

    from . import db, graph, loading, migration, module, registry

  File "/media/sf_git/source/odoo/odoo/modules/graph.py", line 10, in <module>

    import odoo.tools as tools

  File "/media/sf_git/source/odoo/odoo/tools/__init__.py", line 7, in <module>

    from . import pdf

  File "/media/sf_git/source/odoo/odoo/tools/pdf.py", line 4, in <module>

    from PyPDF2 import PdfFileWriter, PdfFileReader

ImportError: No module named 'PyPDF2'


I tried to sudo pip install PyPDF and sudo pip install PyPDF2

But always receive following message:

Reqirement already satisfied (use --upgrade to upgrade): PyPDF in /usr/local/lib/python2.7/dist-packages

You are using pip version 8.1.1, however version 18.1 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.


I am not 100% if everything is set up correctly regarding Python versions. I read that I do require pyhthon 2.7.9 for Odoo 9 and I did install it. But not 100% sure if it is set as default or if I need to configure this some how.

Running python -V returns: Python 2.7.9

Running python3 -V return: Python 3.5.2


Hope you can help me! Thanks in advance!

Avatar
Annuleer

can you setup virtualenv with python2 and

pip install --no-cache -r requiments.txt then try it. here is guide for venv https://virtualenv.pypa.io/en/latest/userguide/

Auteur Beste antwoord

I noticed that I was running on Odoo 11.0 sources. After switichting the branch to Odoo 9.0 it worked just fine!

Avatar
Annuleer
Beste antwoord

The problem is a session that is terminated and ODOO restart but not in VENV context so python3 doesnt find correct dependencies

See the correct mode to launch if venv is used:
https://github.com/odoo/odoo/issues/33479#issuecomment-1207347677

Avatar
Annuleer
Beste antwoord

hello,

install this below package

sudo apt-get install python-pypdf2

or 

sudo python -m pip install pypdf2


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
apr. 21
8420
6
jun. 16
6057
0
feb. 16
2993
3
jan. 16
3774
3
jun. 25
2290