Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
grpc/ | H | 25-Apr-2025 | - | 25,825 | 20,429 | |
.gitignore | H A D | 25-Apr-2025 | 157 | 17 | 16 | |
README.rst | H A D | 25-Apr-2025 | 2.1 KiB | 90 | 56 | |
_parallel_compile_patch.py | H A D | 25-Apr-2025 | 2.8 KiB | 86 | 49 | |
_spawn_patch.py | H A D | 25-Apr-2025 | 2.4 KiB | 65 | 38 | |
commands.py | H A D | 25-Apr-2025 | 13.7 KiB | 384 | 282 | |
grpc_core_dependencies.py | H A D | 25-Apr-2025 | 99.9 KiB | 1,581 | 1,563 | |
grpc_version.py | H A D | 25-Apr-2025 | 689 | 18 | 1 | |
support.py | H A D | 25-Apr-2025 | 4.7 KiB | 134 | 100 |
README.rst
1gRPC Python 2=========== 3 4|compat_check_pypi| 5 6Package for gRPC Python. 7 8.. |compat_check_pypi| image:: https://python-compatibility-tools.appspot.com/one_badge_image?package=grpcio 9 :target: https://python-compatibility-tools.appspot.com/one_badge_target?package=grpcio 10 11Supported Python Versions 12------------------------- 13Python >= 3.8 14 15Installation 16------------ 17 18gRPC Python is available for Linux, macOS, and Windows. 19 20Installing From PyPI 21~~~~~~~~~~~~~~~~~~~~ 22 23If you are installing locally... 24 25:: 26 27 $ pip install grpcio 28 29Else system wide (on Ubuntu)... 30 31:: 32 33 $ sudo pip install grpcio 34 35If you're on Windows make sure that you installed the :code:`pip.exe` component 36when you installed Python (if not go back and install it!) then invoke: 37 38:: 39 40 $ pip.exe install grpcio 41 42Windows users may need to invoke :code:`pip.exe` from a command line ran as 43administrator. 44 45n.b. On Windows and on Mac OS X one *must* have a recent release of :code:`pip` 46to retrieve the proper wheel from PyPI. Be sure to upgrade to the latest 47version! 48 49Installing From Source 50~~~~~~~~~~~~~~~~~~~~~~ 51 52Building from source requires that you have the Python headers (usually a 53package named :code:`python-dev`). 54 55:: 56 57 $ export REPO_ROOT=grpc # REPO_ROOT can be any directory of your choice 58 $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc $REPO_ROOT 59 $ cd $REPO_ROOT 60 $ git submodule update --init 61 62 # For the next two commands do `sudo pip install` if you get permission-denied errors 63 $ pip install -r requirements.txt 64 $ GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install . 65 66You cannot currently install Python from source on Windows. Things might work 67out for you in MSYS2 (follow the Linux instructions), but it isn't officially 68supported at the moment. 69 70Troubleshooting 71~~~~~~~~~~~~~~~ 72 73Help, I ... 74 75* **... see the following error on some platforms** 76 77 :: 78 79 /tmp/pip-build-U8pSsr/cython/Cython/Plex/Scanners.c:4:20: fatal error: Python.h: No such file or directory 80 #include "Python.h" 81 ^ 82 compilation terminated. 83 84 You can fix it by installing `python-dev` package. i.e 85 86 :: 87 88 sudo apt-get install python-dev 89 90