[BUG] Flytekit gRPC error: symbol not found in flat namespace '_CFRelease'
See original GitHub issueDescribe the bug
There seems to be an issue with grpc when calling pyflyte run
equilibrium pyflyte run <aws:eq>
Traceback (most recent call last):
File "/Users/bwilliams/miniforge3/envs/flyte/bin/pyflyte", line 5, in <module>
from flytekit.clis.sdk_in_container.pyflyte import main
File "/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/__init__.py", line 163, in <module>
from flytekit.core.base_sql_task import SQLTask
File "/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/core/base_sql_task.py", line 4, in <module>
from flytekit.core.base_task import PythonTask, TaskMetadata
File "/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/core/base_task.py", line 28, in <module>
from flytekit.core.context_manager import ExecutionParameters, FlyteContext, FlyteContextManager, FlyteEntities
File "/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/core/context_manager.py", line 30, in <module>
from flytekit.clients import friendly as friendly_client # noqa
File "/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/clients/friendly.py", line 18, in <module>
from flytekit.clients.raw import RawSynchronousFlyteClient as _RawSynchronousFlyteClient
File "/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/flytekit/clients/raw.py", line 9, in <module>
import grpc
File "/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/grpc/_compression.py", line 15, in <module>
from grpc._cython import cygrpc
ImportError: dlopen(/Users/bwilliams/miniforge3/envs/flyte/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_CFRelease'
Expected behavior
This should run the script being invoked
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn’t been raised already?
- Yes
Have you read the Code of Conduct?
- Yes
Issue Analytics
- State:
- Created a year ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Symbol not found: _CFRelease while running Python app
I am hoping to run my app without any problem, but I got this attached error. Could someone help or ...
Read more >Error when import grpc: "Symbol not found: _deflate"解决方法
Referenced from: /anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so. Expected in: flat namespace.
Read more >Symbol not found, Expected in: flat namespace - splunktool
Trying to run freqtrader and getting a weird error that I can't find a solution for - just wondering if you'd have an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I resolved this by doing:
pip uninstall grpcio conda install grpcio conda install grpcio-tools
This correctly installed the M1 versions. For info, see: https://stackoverflow.com/questions/72620996/apple-m1-symbol-not-found-cfrelease-while-running-python-app
I was using Python 3.9.12 on a Mac Studio running macOS v12.5.1
@bmwilly I found that this error only happened in miniforge3. To work around this error, you could use Anaconda.