Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: dlopen - symbol not found in flat namespace '_CFRelease' #56

Closed
Elicherla01 opened this issue Jun 13, 2023 · 9 comments
Closed

Comments

@Elicherla01
Copy link

I am getting below error.

I am using Mac OS - M1

image
@willydouhard
Copy link
Collaborator

It looks like there is a problem with your grpc build as discussed here.

Can you give me your version of grpc pip show grpcio? Also are you using conda?

@littson
Copy link

littson commented Jun 16, 2023

Same problem. Can be solved by rebuilding grpcio from source: source link.

@dsantiago
Copy link

Same problem. Can be solved by rebuilding grpcio from source: source link.

Yeah this solves the problem, thanks!

Posting here the solution to facilitate:

pip uninstall grpcio
export GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation"
pip install grpcio --no-binary :all:

@sumanghosh1234
Copy link

I am still facing the same problem even after trying

pip uninstall grpcio
export GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation"
pip install grpcio --no-binary :all:

from grpc._cython import cygrpc
ImportError: dlopen(/Users/123456/miniforge3/lib/python3.11/site-packages/grpc/_cython/cygrpc.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_kCFStreamPropertySocketNativeHandle'
@willydouhard
@dsantiago

@willydouhard
Copy link
Collaborator

Can you try to disable the telemetry? Set enable_telemetry=false in .chainlit/config.toml. I think grpc is only used for that purpose.

@RoacherM
Copy link

RoacherM commented Oct 9, 2023

i solved this issue with this method.

  1. pip uninstall grpcio
  2. add those three lines at the end of your .zshrc file

export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
export GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation"
3. pip install grpcio --no-binary :all:

@wiharto
Copy link

wiharto commented Oct 21, 2023

I use conda environment and this works for me

  1. pip uninstall grpcio
  2. conda install grpcio

pip install grpcio gives me an error about not being able to build the wheel for grpcio.

@JustinGuese
Copy link

Same problem. Can be solved by rebuilding grpcio from source: source link.

Yeah this solves the problem, thanks!

Posting here the solution to facilitate:

pip uninstall grpcio
export GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation"
pip install grpcio --no-binary :all:

confirm working

@pq-dong
Copy link

pq-dong commented Nov 13, 2023

Same problem. Can be solved by rebuilding grpcio from source: source link.

Yeah this solves the problem, thanks!

Posting here the solution to facilitate:

pip uninstall grpcio
export GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation"
pip install grpcio --no-binary :all:

I made an error using this command, but I changed it to pip install --no-cache-dir --force-reinstall -Iv grpcio --no-binary :all: and it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants