Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
18835 Переглядів

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!

Аватар
Відмінити

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/

Автор Найкраща відповідь

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

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Найкраща відповідь

hello,

install this below package

sudo apt-get install python-pypdf2

or 

sudo python -m pip install pypdf2


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
3
квіт. 21
8416
6
черв. 16
6057
0
лют. 16
2989
3
січ. 16
3771
3
черв. 25
2266