You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/08/17 16:02:16 UTC

[GitHub] [beam] Abacn commented on issue #22742: Import Error in Python on M1 Mac

Abacn commented on issue #22742:
URL: https://github.com/apache/beam/issues/22742#issuecomment-1218216468

   My understanding to this issue is that Beam is using some internal APIs of protobuf and the distributed protobuf release may not contain them depending on platforms. Have to do a compile installlation of protobuf. First install the sources
   
   ```
   brew install protobuf@3
   ```
   
   For me this installs to /opt/homebrew/Cellar/protobuf@3/3.20.1
   
   then set
   
   ```
   export CPPFLAGS="-I/opt/homebrew/Cellar/protobuf@3/3.20.1/include"
   export LDFLAGS="-L/opt/homebrew/Cellar/protobuf@3/3.20.1/lib"
   ```
   
   then install protobuf with
   
   ```
   pip install protobuf==3.20.1 --install-option="--cpp_implementation" --force
   ```
   
   then `python gen_protos.py` should work.
   
   This is only required when the user needs to compile beam from source. For the distributed beam releases the generated sources are included in release and the users do not need to do this.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org