current position:Home>Python manually install Jieba library (Win11)

Python manually install Jieba library (Win11)

2022-11-08 07:06:01Alexabc3000

Compared with English text, the first problem facing Chinese text mining is word segmentation, because there is no space between Chinese words.In Python, the jieba library can be used for Chinese word segmentation.

This article describes how to manually install the jieba library to anaconda3 and python 3.11.

Download jieba library

Download URL: jieba · PyPI

Get the file after downloading: jieba-0.42.1.tar.gz

Extract to current folder:

E:\softwares\Python\jieba-0.42.1

Manual install to anaconda3

Copy the "jieba" directory to "D:\Programs\Anaconda3\Lib\site-packages":

Command execution verification:

python

import jieba

jieba.lcut("China is a great country")

The execution result is shown in the following figure:

Manual install to Python 3.11

Copy the "jieba" directory to "D:\Programs\Python\Python311\Lib\site-packages":

Command execution verification:

python

import jieba

jieba.lcut("China is a great country")

The execution result is shown in the following figure:

Note: The above is an example of anaconda and python on my personal computer. The installation directory of different computers may be different.

Related References:

  1. Installation of Jieba library. Jieba library installation _W_chuanqi's blog-CSDN blog _jieba library installation
  2. The GitHub URL of the jieba library. GitHub - fxsjy/jieba: Chinese word segmentation for stuttering
  3. Jieba library official website download address. jieba · PyPI

copyright notice
author[Alexabc3000],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/312/202211080655320181.html

Random recommended