Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install thrift via python pip




thrift - Python bindings for the Apache Thrift RPC system, it belongs to Classifiers:

- Environment :: Console
- Topic :: System
- Topic :: System :: Networking

When you know about this project and you want to new install thrift to support your project or you get trouble as ModuleNotFoundError: No module named "thrift" or ImportError: cannot import name "thrift" in your project, let follow this tutorial to install thrift



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_thrift_env

- Active the virtual environment

test_thrift_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_thrift_env

- Active the virtual environment

source test_thrift_env/bin/active


Step 2: OK, now, let flow below content to start the installation thrift

To install thrift on Windows(CMD):

py -m pip install thrift

To install thrift on Unix/macOs:

pip install thrift


Step 3: If you want to install a specific thrift version, add ==<thrift version> to the end command line

Example:

pip install thrift==0.8.0


Please see the version list below table:

VersionReleased dateCommand
thrift 0.16.02022-03-31T14:54:06Windows:

py -m pip install thrift==0.16.0

Unix/macOs:

pip install thrift==0.16.0

thrift 0.15.02021-09-25T20:23:08Windows:

py -m pip install thrift==0.15.0

Unix/macOs:

pip install thrift==0.15.0

thrift 0.14.22021-09-25T20:20:13Windows:

py -m pip install thrift==0.14.2

Unix/macOs:

pip install thrift==0.14.2

thrift 0.14.12021-09-25T20:18:11Windows:

py -m pip install thrift==0.14.1

Unix/macOs:

pip install thrift==0.14.1

thrift 0.14.02021-09-25T20:11:57Windows:

py -m pip install thrift==0.14.0

Unix/macOs:

pip install thrift==0.14.0

thrift 0.13.02019-11-18T04:50:57Windows:

py -m pip install thrift==0.13.0

Unix/macOs:

pip install thrift==0.13.0

thrift 0.11.02018-01-11T17:25:25Windows:

py -m pip install thrift==0.11.0

Unix/macOs:

pip install thrift==0.11.0

thrift 0.10.02017-01-14T20:51:06Windows:

py -m pip install thrift==0.10.0

Unix/macOs:

pip install thrift==0.10.0

thrift 0.9.32015-10-12T01:34:41Windows:

py -m pip install thrift==0.9.3

Unix/macOs:

pip install thrift==0.9.3

thrift 0.9.22014-11-18T03:29:53Windows:

py -m pip install thrift==0.9.2

Unix/macOs:

pip install thrift==0.9.2

thrift 0.9.12013-08-22T02:07:42Windows:

py -m pip install thrift==0.9.1

Unix/macOs:

pip install thrift==0.9.1

thrift 0.9.02012-10-16T02:59:34Windows:

py -m pip install thrift==0.9.0

Unix/macOs:

pip install thrift==0.9.0

thrift 0.8.02011-11-30T01:16:16Windows:

py -m pip install thrift==0.8.0

Unix/macOs:

pip install thrift==0.8.0


Step 4: Otherwise, you can install thrift from local archives:

Download the distribution file from thrift-0.16.0.tar.gz or the specific thrift version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_thrift_downloaded_file>

On Unix/macOs:

pip install <path_to_thrift_downloaded_file>


List distribution:


Project link:

- Homepage