InstallScript icon indicating copy to clipboard operation
InstallScript copied to clipboard

Ubuntu 20.04 LTS python 3.8

Open composercodes opened this issue 4 years ago • 9 comments

please when I install odoo 14 on Ubuntu 20.04 LTS it install python 3.8 and some packages inside requirement.txt not installed successfully . what's preferred ubuntu version for odoo ? 20.04 LTS or 18.06 how can I downgrade python to 3.7 ?

composercodes avatar Oct 07 '20 00:10 composercodes

I am using pyenv and pyenv virtualenv to select a specific version of python. Personally, I am using python 3.7.9 with Odoo 14

https://github.com/pyenv/pyenv https://github.com/pyenv/pyenv-virtualenv

jcdrubay avatar Oct 07 '20 02:10 jcdrubay

20.04 LTS & 18.04 LTS are the main focus. Why would you want to downgrade to Python 3.7 though? What errors do you get?

Yenthe666 avatar Oct 07 '20 06:10 Yenthe666

There is no particular reason. I did not check the compatibility of python 3.8.

Do you think there is any recommendation of which python version x.y.z to use for each version? Do you think we should care about minor version x.y.z or should we only care about x.y ?

jcdrubay avatar Oct 07 '20 07:10 jcdrubay

Odoo should support Python 3.8 (they in fact did quite some fixes in the past for 3.8, see https://github.com/odoo/odoo/pulls?q=is%3Apr+3.8+is%3Aclosed). As you can see there where/are quite some issues about dependencies and packaging too. See https://github.com/odoo/odoo/issues?q=is%3Aissue+3.8+is%3Aclosed As far as I know Python 3.5 - 3.8 should work fine with Odoo V12/V13/V14.

Yenthe666 avatar Oct 07 '20 08:10 Yenthe666

Thanks for taking the time to answer me @Yenthe666 👍

jcdrubay avatar Oct 07 '20 08:10 jcdrubay

No problem :) I'll keep this one open to keep an eye out for it because I have to do a new 14 install this week anyways. I'll verify this while at it.

Yenthe666 avatar Oct 07 '20 08:10 Yenthe666

20.04 LTS & 18.04 LTS are the main focus. Why would you want to downgrade to Python 3.7 though? What errors do you get?

when to try install script odoo 14 on 20.04 LTS :

First :

---- Update Server ---- sudo: add-apt-repository: command not found

Solved by :

sudo apt-get install software-properties-common

Second :

Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb (--unpack): unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directory Errors were encountered while processing: /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

Solved by :

sudo add-apt-repository ppa:linuxuprising/libpng12 sudo apt update sudo apt install libpng12-0

Third :

When try to start odoo WARNING appears . 2020-10-08 01:15:35,327 26564 WARNING ? py.warnings: /usr/local/lib/python3.8/dist-packages/PIL/Image.py:812: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats s = d.decode(data)

2020-10-08 01:15:35,328 26564 WARNING ? py.warnings: /usr/local/lib/python3.8/dist-packages/PIL/Image.py:477: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats return encoder(mode, *args + extra)

Solved by :

python3 -m pip install --upgrade Pillow

Testing install employee module : py.warnings: /usr/local/lib/python3.8/dist-packages/jinja2/sandbox.py:82: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working from collections import MutableSet, MutableMapping, MutableSequence

after that odoo installation same to be clear and odoo log also clear

composercodes avatar Oct 08 '20 02:10 composercodes

Also see https://github.com/odoo/odoo/pull/54785

Yenthe666 avatar Oct 08 '20 07:10 Yenthe666

there are some issues with oca modules

clock is not suported in python 3.8

https://groups.google.com/g/openerp-spain-users/c/71Nu-UGOq54

fgarcia-humanoide avatar Dec 26 '20 06:12 fgarcia-humanoide