Reputation: 5450
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.
Upvotes: 3
Views: 8861
Reputation: 93
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
Upvotes: 8
Reputation: 46
Odoo 15 currently seems to be incompatible with Python 3.10.
You can get rid of that error by upgrading gevent/greenlet to newer versions in the requirements file. I've successfully tried gevent 21.12.0 and greenlet 1.1.3, BUT then you'll run into more trouble due to changes in the Python collections package. Here is a link to the issue regarding the gevent error for reference.
Downgrade to Python 3.9.0 for the moment to continue with the installation.
Upvotes: 1