2

I am trying to install the requirements for odoo15 on my MBP M1 Pro running MacOS Ventura 13.0 in my virtual environment running python 3.10.8

but I keep getting the following error:

build/temp.macosx-12-arm64-cpython-310/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
      #include <openssl/opensslv.h>
               ^~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cryptography
  Building wheel for psycopg2 (setup.py) ... error
  error: subprocess-exited-with-error
...
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
      ld: library not found for -lssl
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psycopg2
  Running setup.py clean for psycopg2
...
Failed to build cryptography psycopg2
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects

Now, I have already spent a lot of time researching and it seems that openssl might be the problem here

I have already install openssl via brew, it is running the newest version, as suggested in this GitHub issue

I have installed the newest version of pip as suggested in this StackOverflow post

Edit: I have now also tried setting these flags as suggested in this StackOverflow post:

export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"

I have also retried everything in another venv using Python version 3.8

CZoellner
  • 13,553
  • 3
  • 25
  • 38
unnamed-dev
  • 165
  • 8
  • https://stackoverflow.com/a/67430399/7976758 Found in https://stackoverflow.com/search?q=%5Bpip%5D+opensslv.h+file+not+found – phd Nov 19 '22 at 13:06
  • @phd thanks for the tip, unfortunately it did not work out – unnamed-dev Nov 19 '22 at 13:54
  • To anyone wondering, this solved all the problems: https://stackoverflow.com/questions/73667667/installing-odoo-on-mac-raises-gevent-error – unnamed-dev Mar 13 '23 at 10:29

0 Answers0