grpc issue on M2 mac with #3852 #4722
-
Self Checks
Dify version0.6.5 Cloud or Self HostedSelf Hosted (Source) Steps to reproduceWith 0.6.5 and #3852 my M2 mac is throwing grpc error (grpc/_cython/cygrpc.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_CFDataGetBytes') Installing grpcio 1.62.2 fixes that issue, but is not compatible with pymilvus 2.3.1 (requires grpcio<=1.58.0,>=1.49.1) Do you have any suggestions other than not coding on my Mac? 🥇 ✔️ Expected BehaviorNo response ❌ Actual BehaviorNo response |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
The issue you're encountering with grpc on your M2 Mac, when using Dify version 0.6.5 alongside grpcio 1.62.2 and pymilvus 2.3.1, seems to stem from a compatibility problem between these specific versions. The grpc error you've described is indicative of a missing symbol, likely due to the grpcio version not fully supporting the M2 architecture or conflicting with other dependencies. Given pymilvus 2.3.1's requirement for grpcio to be within the range >=1.49.1, <=1.58.0, upgrading to grpcio 1.62.2 as a workaround for the M2 compatibility issue introduces a new problem: it falls outside the compatible range required by pymilvus, leading to further compatibility issues. Unfortunately, without a direct fix or workaround available in the repositories for this specific grpc issue on M2 Macs, and considering the constraints around grpcio's version compatibility with pymilvus, the situation is indeed challenging. To better assist, could you provide additional details about your setup, including the Python version, operating system version, and any other relevant dependencies? This information could help in identifying potential workarounds or alternative solutions. Additionally, sharing the exact steps you've taken to configure your environment, as well as the full error message or stack trace, could offer more insights into the issue, potentially leading to a more targeted solution.
|
Beta Was this translation helpful? Give feedback.
-
hello, do you have a solution? |
Beta Was this translation helpful? Give feedback.
-
temporary solution: |
Beta Was this translation helpful? Give feedback.
-
@takatost It seems some deps are outdated in recent versions. #3795 |
Beta Was this translation helpful? Give feedback.
-
I encountered this when trying to develop based on dify 0.6.8. The comment here worked for me. |
Beta Was this translation helpful? Give feedback.
-
Option 1. install grpcio from source: GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation" pip install grpcio --no-binary :all:. I'm seeing a CompileError, but looks like it works for many people. This works for me. See original link here. grpc/grpc#33714 (comment) |
Beta Was this translation helpful? Give feedback.
Option 1. install grpcio from source: GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation" pip install grpcio --no-binary :all:.
I'm seeing a CompileError, but looks like it works for many people.
Option 2. Install grpcio from conda: conda install grpcio.
This works for me.
Closing this issue now, please let us know if neither of those works.
See original link here. grpc/grpc#33714 (comment)