trying to locate a working grpc to install - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: trying to locate a working grpc to install (/thread-18215.html) |
trying to locate a working grpc to install - MrMajorThorburn - May-09-2019 I am trying to find a working grpc to install. The command I tried and result was >py -m pip install grpc Collecting grpc Using cached https://files.pythonhosted.org/packages/dd/63/e25fa1e7dbbd44ae4d2d5ceb1bfef517849c854795e73d01bfd3d250a8b1/grpc-0.3-19.tar.gz ERROR: Complete output from command python setup.py egg_info: ERROR: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\major\AppData\Local\Temp\pip-install-mybqpm3g\grpc\setup.py", line 7, in <module> version_tuple = __import__('grpc').VERSION File "C:\Users\major\AppData\Local\Temp\pip-install-mybqpm3g\grpc\grpc\__init__.py", line 6, in <module> from .rpc import * File "C:\Users\major\AppData\Local\Temp\pip-install-mybqpm3g\grpc\grpc\rpc.py", line 141 except OSError, ex: ^ SyntaxError: invalid syntax ---------------------------------------- ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\major\AppData\Local\Temp\pip-install-mybqpm3g\grpc\ SO any1 give me a hint as to where I can get a good version? RE: trying to locate a working grpc to install - buran - May-09-2019 python version? RE: trying to locate a working grpc to install - buran - May-09-2019 pip install grpc will try to install this package - https://pypi.org/project/grpc/As you can see it's not updated since 2016, i.e. looks not maintained any longer better check this one https://pypi.org/project/grpcio/ for it there are also windows binaries on Gohlke or this one https://pypi.org/project/grpcalchemy/ https://pypi.org/project/grpcalchemy/ RE: trying to locate a working grpc to install - MrMajorThorburn - May-09-2019 Ok thanks for that. I have installed grpcio and re-ran what I was trying and got a module not found error from an import grpc. I changed the py file to use grpcio instead and got the same error. I did pip show grpcio and got Name: grpcio Version: 1.18.0 Summary: HTTP/2-based RPC framework Home-page: https://grpc.io Author: The gRPC Authors Author-email: [email protected] License: Apache License 2.0 Location: c:\users\major\appdata\roaming\python\python37\site-packages Requires: six Required-by: aiogrpc I checked the site-packages folder and could not find a sub folder called grpcio. There is one called grpcio-1.18.0.dist-info At the moment I am confused again. p.s. any1 tell me why my profile has 'Programmer Named Tim' under my logo? RE: trying to locate a working grpc to install - buran - May-09-2019 (May-09-2019, 05:26 PM)MrMajorThorburn Wrote: p.s. any1 tell me why my profile has 'Programmer Named Tim' under my logo?https://python-forum.io/misc.php?action=help&hid=29 as to your question - I can only refer you to the docs of the package https://grpc.io/docs/ RE: trying to locate a working grpc to install - snippsat - May-09-2019 Quick test,homepage Doing it in virtual environment,it's now build into Python newer versions as you use 3.7. E:\div_code λ python -m venv grpv_env E:\div_code λ cd grpv_env\ E:\div_code\grpv_env λ E:\div_code\grpv_env\Scripts\activate # Install into environment (grpv_env) E:\div_code\grpv_env λ pip install grpcio Collecting grpcio Downloading ..... Installing collected packages: six, grpcio Successfully installed grpcio-1.20.1 six-1.12.0 (grpv_env) E:\div_code\grpv_env λ pip install ptpython Collecting ptpython .... Installing collected packages: parso, jedi, docopt, pygments, wcwidth, prompt-toolkit, ptpython Successfully installed docopt-0.6.2 jedi-0.13.3 parso-0.4.0 prompt-toolkit-2.0.9 ptpython-2.0.4 pygments-2.4.0 wcwidth-0.1.7I also install ptpython into environment,this make a lot easier to explore a package that not has so much Python documentation. (grpv_env) E:\div_code\grpv_env λ ptpython >>> import grpc >>> grpc.__version__ '1.20.1'So there is a lot of method under grpc eg grpc.Call ect...As i using ptpython all methods is showing up automatically after grpc . ,with doc string.There is a lot method if list all without special methods(__something__). Version pip show:(grpv_env) E:\div_code\grpv_env λ pip show grpcio Name: grpcio Version: 1.20.1 Summary: HTTP/2-based RPC framework Home-page: https://grpc.io Author: The gRPC Authors Author-email: [email protected] License: Apache License 2.0 Location: e:\div_code\grpv_env\lib\site-packages Requires: six Required-by:Looking at doc there is also pip install grpcio-tools With a hello world example after clone from Repo. So can do a test of that: (grpv_env) E:\div_code\grpv_env λ pip install grpcio-tools Collecting grpcio-tools Downloading ..... Installing collected packages: protobuf, grpcio-tools Successfully installed grpcio-tools-1.20.1 protobuf-3.7.1 (grpv_env) E:\div_code\grpv_env λ git clone -b v1.20.0 https://github.com/grpc/grpc Cloning into 'grpc'... Checking out files: 100% (10008/10008), done.Test server --> client. (grpv_env) E:\div_code\grpv_env\grpc\examples\python\helloworld ((no branch)) λ python greeter_server.pyNow in a other cmder window. (grpv_env) E:\div_code\grpv_env\grpc\examples\python\helloworld ((no branch)) λ python greeter_client.py Greeter client received: Hello, you! RE: trying to locate a working grpc to install - MrMajorThorburn - May-10-2019 Ok so the greeter test worked. So if this means I have a working grpc in my gitrep can I somehow install it from there? It seems to me that trying to resolve my problem with grpc when the product has moved on and its function is now under grpcio that trying to fix my problem with grpc is a waste of everyone's time. I have other errors I want to ask about so will raise an new item for the next one and leave this to die. |