-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Symbol not found: _deflate from grpc 1.12.0 #15510
Comments
I tried this with virtualenv as well and the same issue exists as well. So its not Anaconda specific. Traceback (most recent call last): |
@mehrdada: would you be able to take a look at this in the next day or two? |
Cannot reproduce on Python3 installed via
|
@mehrdada the reporter was talking about anaconda as a distribution method. https://anaconda.org/anaconda/python - I don't think it's fair to use this label if you don't try to reproduce exactly :-) |
Hi, as I mentioned I was able to reproduce this with both Anaconda as well as virtualenv... I haven't tried python via brew but I use Anaconda as the primary distribution. However, I see the same issue whether i use conda or pip to install grpc. |
@nicolasnoble @ssarangi I assume the |
|
@ssarangi As a potential workaround, can you ask pip to force install |
Where do I get the Python you used for virtualenv to try repro? |
@mehrdada I just used regular pip once I activated the virtualenv. Let me try to build grpcio from source. |
@mehrdada I just tried building and installing from source and still see the same issue. I had uninstalled the pip version and verified that and then built from source. |
So I guess it means it's all from anaconda. Meaning that the virtualenv is provided by it too. |
We had a similar internal bug about Anaconda specifically (b/76345760) and supporting Anaconda was deemed Infeasible by @nathanielmanistaatgoogle and closed. But if a Python binary/install fetched from brew or https://www.python.org/ reproduces this behavior, we should certainly look at it. |
I did look at that bug. I was surprised that virtualenv did work though. I will try it out on a non-anaconda distro on osx and report back. |
Have you solved it? I have the same problem. |
It did work on brew based python so it could be a difference in python binary. Would have been great to have it work with anaconda but as long as it works with brew as well I can manage. |
@ssarangi If you have the bandwidth, I strongly encourage you to please follow-up on this issue with Anaconda. They will either hopefully resolve this or provide us with the rationale on why this fails and hints on what the best way to resolve this is (ideally with a convincing argument), as none of us working on gRPC Python happen to be Anaconda experts at the moment. |
I solved it by using this command: |
Try adding |
@im-sure also worked for me, thank you! |
I was importing grpc first, but after moving "from concurrent import futures" above it, it seems to work fine. Thanks for the fix @wandering007 |
thank you @wandering007 It works |
@wandering007 This is amazing.
resolves this error. |
What version of gRPC and what language are you using?
gRPC Version: 1.12.0 Python: 3.6.4 (From Anaconda)
What operating system (Linux, Windows, …) and version?
OSX (High Sierra)
What runtime / compiler are you using (e.g. python version or version of gcc)
Python: 3.6.4 (From Anaconda)
What did you do?
If possible, provide a recipe for reproducing the error. Try being specific and include code snippets if helpful.
A simple grpc tutorial fails to run and fails on import.
What did you expect to see?
I expected the server to run.
What did you see instead?
python server.py
Traceback (most recent call last):
File "server.py", line 1, in
import grpc
File "/Users/satyajits/anaconda3/lib/python3.6/site-packages/grpc/init.py", line 22, in
from grpc._cython import cygrpc as _cygrpc
ImportError: dlopen(/Users/satyajits/anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so, 2): Symbol not found: _deflate
Referenced from: /Users/satyajits/anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/satyajits/anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment?
None.
The text was updated successfully, but these errors were encountered: