Skip to Content
Menu
This question has been flagged

Ubuntu 22.04

Python 3.10.12

During script installation of Odoo 17 (yenthe666), installation of the required packages had an issue. It worked on previous installs until this now...

---- Install python packages/requirements ----
Ignoring Babel: markers 'python_version >= "3.11"' don't match your environment
Ignoring chardet: markers 'python_version >= "3.11"' don't match your environment
Ignoring cryptography: markers 'python_version >= "3.12"' don't match your environment
Ignoring decorator: markers 'python_version >= "3.11"' don't match your environment
Ignoring docutils: markers 'python_version >= "3.11"' don't match your environment
Ignoring freezegun: markers 'python_version >= "3.11"' don't match your environment
Ignoring gevent: markers 'sys_platform != "win32" and python_version > "3.10" and python_version < "3.12"' don't match your environment
Ignoring gevent: markers 'sys_platform != "win32" and python_version >= "3.12"' don't match your environment
Ignoring greenlet: markers 'sys_platform != "win32" and python_version > "3.10" and python_version < "3.12"' don't match your environment
Ignoring greenlet: markers 'sys_platform != "win32" and python_version >= "3.12"' don't match your environment
Ignoring idna: markers 'python_version >= "3.12"' don't match your environment
Ignoring Jinja2: markers 'python_version > "3.10"' don't match your environment
Ignoring libsass: markers 'python_version >= "3.11"' don't match your environment
Ignoring lxml: markers 'python_version > "3.10" and python_version < "3.12"' don't match your environment
Ignoring lxml: markers 'python_version >= "3.12"' don't match your environment
Ignoring lxml-html-clean: markers 'python_version >= "3.12"' don't match your environment
Ignoring MarkupSafe: markers 'python_version > "3.10" and python_version < "3.12"' don't match your environment
Ignoring MarkupSafe: markers 'python_version >= "3.12"' don't match your environment
Ignoring num2words: markers 'python_version >= "3.12"' don't match your environment
Ignoring Pillow: markers 'python_version > "3.10" and python_version < "3.12"' don't match your environment
Ignoring Pillow: markers 'python_version >= "3.12"' don't match your environment
Ignoring psutil: markers 'python_version > "3.10" and python_version < "3.12"' don't match your environment
Ignoring psutil: markers 'python_version >= "3.12"' don't match your environment
Ignoring psycopg2: markers 'python_version == "3.11"' don't match your environment
Ignoring psycopg2: markers 'python_version >= "3.12"' don't match your environment
Ignoring pyopenssl: markers 'python_version >= "3.12"' don't match your environment
Ignoring PyPDF2: markers 'python_version > "3.10"' don't match your environment
Ignoring pypiwin32: markers 'sys_platform == "win32"' don't match your environment
Ignoring python-dateutil: markers 'python_version >= "3.11"' don't match your environment
Ignoring python-ldap: markers 'sys_platform != "win32" and python_version >= "3.12"' don't match your environment
Ignoring python-stdnum: markers 'python_version >= "3.11"' don't match your environment
Ignoring qrcode: markers 'python_version >= "3.11"' don't match your environment
Ignoring reportlab: markers 'python_version > "3.10" and python_version < "3.12"' don't match your environment
Ignoring reportlab: markers 'python_version >= "3.12"' don't match your environment
Ignoring requests: markers 'python_version >= "3.11"' don't match your environment
Ignoring rjsmin: markers 'python_version >= "3.11"' don't match your environment
Ignoring rl-renderPM: markers 'sys_platform == "win32" and python_version >= "3.12"' don't match your environment
Ignoring urllib3: markers 'python_version >= "3.12"' don't match your environment
Ignoring Werkzeug: markers 'python_version > "3.10" and python_version < "3.12"' don't match your environment
Ignoring Werkzeug: markers 'python_version >= "3.12"' don't match your environment
Ignoring xlrd: markers 'python_version >= "3.12"' don't match your environment
Ignoring XlsxWriter: markers 'python_version >= "3.12"' don't match your environment
Ignoring zeep: markers 'python_version >= "3.11"' don't match your environment
Collecting Babel==2.9.1
  Using cached Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
Requirement already satisfied: chardet==4.0.0 in /usr/lib/python3/dist-packages (from -r https://github.com/odoo/odoo/raw/17.0/requirements.txt (line 5)) (4.0.0)
Requirement already satisfied: cryptography==3.4.8 in /usr/lib/python3/dist-packages (from -r https://github.com/odoo/odoo/raw/17.0/requirements.txt (line 7)) (3.4.8)
Collecting decorator==4.4.2
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting docutils==0.17
  Using cached docutils-0.17-py2.py3-none-any.whl (575 kB)
Collecting ebaysdk==2.1.5
  Using cached ebaysdk-2.1.5.tar.gz (42 kB)
  Preparing metadata (setup.py) ... done
Collecting freezegun==1.1.0
  Using cached freezegun-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting geoip2==2.9.0
  Using cached geoip2-2.9.0-py2.py3-none-any.whl (18 kB)
Collecting gevent==21.8.0
  Using cached gevent-21.8.0.tar.gz (6.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [46 lines of output]
      Compiling src/gevent/resolver/cares.pyx because it changed.
      [1/1] Cythonizing src/gevent/resolver/cares.pyx
      performance hint: src/gevent/libev/corecext.pyx:1325:0: Exception check on '_syserr_cb' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare '_syserr_cb' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on '_syserr_cb' to allow an error code to be returned.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      cdef tuple integer_types

      if sys.version_info[0] >= 3:
          integer_types = int,
      else:
          integer_types = (int, long)
                                ^
      ------------------------------------------------------------

      src/gevent/libev/corecext.pyx:60:26: undeclared name not builtin: long
      Compiling src/gevent/libev/corecext.pyx because it changed.
      [1/1] Cythonizing src/gevent/libev/corecext.pyx
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
          return self._get_build_requires(
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 143, in _get_build_requires
          self.run_setup()
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 267, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 50, in <module>
          CORE = cythonize1(build_libev_extension())
        File "/tmp/pip-install-ryds2jcy/gevent_0020f72785864fd099ff65a2b0fb806e/_setuputils.py", line 237, in cythonize1
          new_ext = cythonize(
        File "/tmp/pip-build-env-nahuif3o/overlay/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 1109, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-nahuif3o/overlay/local/lib/python3.10/dist-packages/Cython/Build/Dependencies.py", line 1256, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: src/gevent/libev/corecext.pyx
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I've been diagnosing this problem since Ubuntu 24 and ended up hard resetting to Ubuntu 22. The decision was also due to the Python 12 issue, and as a newbie, it seemed logical. 

Does "ignoring packages due to not matching the environment" affect the overall service? I'm unsure how to mitigate this, as some specify "win32".

I've run separately:

pip install -r requirements.txt

Yet I get the same "ignoring files" and "build to wheel" error.

Searching up similar issues yielded similar solutions:

sudo apt install libpq-dev

But the issue is I already have it installed (newest version 17.2.1)

Running:

sudo service odoo-server start / sudo systemctl start odoo-server

Yield no results, no start-up. The only response I get from "systemctl status" is:

odoo-server.service - LSB: Enterprise Business Applications
     Loaded: loaded (/etc/init.d/odoo-server; generated)
     Active: active (exited) since Fri 2025-01-10 12:38:29 UTC; 11min ago
       Docs: man:systemd-sysv-generator(8)
        CPU: 113ms

Jan 10 12:38:29 vantamsvr systemd[1]: Starting LSB: Enterprise Business Applications...
Jan 10 12:38:29 vantamsvr odoo-server[1013]: Starting odoo-server: odoo-server.
Jan 10 12:38:29 vantamsvr systemd[1]: Started LSB: Enterprise Business Applications.

There are no logs either. The location is created, but no "odoo-server.log" to read from.

My last effort was to run "./odoo-bin" manually this yielded:

Traceback (most recent call last):
  File "/odoo/odoo-server/./odoo-bin", line 5, in <module>
    import odoo
  File "/odoo/odoo-server/odoo/__init__.py", line 115, in <module>
    from . import modules
  File "/odoo/odoo-server/odoo/modules/__init__.py", line 8, in <module>
    from . import db, graph, loading, migration, module, registry, neutralize
  File "/odoo/odoo-server/odoo/modules/db.py", line 4, in <module>
    from psycopg2.extras import Json
ModuleNotFoundError: No module named 'psycopg2'

Please help, I've been diagnosing this issue for a week now!

Avatar
Discard
Best Answer

Hello!
Try to install python3.12 from the DeadSnakes PPA repository and python3.12-venv, python3.12-dev as well.
Then create venv using command

python3.12 -m venv odoo18-venv

and so on.
This should fix your problems.

Hope it helps you :-)

Cheers!


P.S. I've just installed Odoo18 the way I posted here.

Avatar
Discard
Related Posts Replies Views Activity
0
Jan 24
1663
0
Feb 25
489
1
Jan 24
923
1
Jul 24
4181
0
Apr 24
665