Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Odoo on Mac raises gevent error

I'm following this tutorial to install Odoo 15 on Mac, but I'm getting this error when running pip install -r requirements.txt:

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      cdef load_traceback
      cdef Waiter
      cdef wait
      cdef iwait
      cdef reraise
      cpdef GEVENT_CONFIG
            ^
      ------------------------------------------------------------
      
      src/gevent/_gevent_cgreenlet.pxd:181:6: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.

I have found several documents addressing cython errors, but none addressing the specific exception I'm getting.

like image 688
HuLu ViCa Avatar asked Oct 23 '25 11:10

HuLu ViCa


1 Answers

this solved it for me:

pip install pip setuptools wheel Cython==3.0.0a10
pip install gevent==20.9.0 --no-build-isolation

if some problem with psycopg2 occurs, run this: (you can change 2.8.6 to 2.8.5 depending on what you need)

export LDFLAGS="-L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/opt/libpq/lib"
export CPPFLAGS="-I/opt/homebrew/opt/[email protected]/include -I/opt/homebrew/opt/libpq/include"

pip3 install psycopg2==2.8.6

you might also need

brew install libpq --build-from-source                                                                                      brew install openssl

export LDFLAGS="-L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/opt/libpq/lib"
export CPPFLAGS="-I/opt/homebrew/opt/[email protected]/include -I/opt/homebrew/opt/libpq/include"

and if reportlab raises an installation error, try this:

CFLAGS="-Wno-error=implicit-function-declaration" pip install reportlab==3.5.55  
like image 157
Anir_Ln Avatar answered Oct 25 '25 00:10

Anir_Ln