ルールを使用してhtmlからデータを抽出できるライブラリ「textminer」をインストール

スポンサーリンク

ルールを使用してhtmlからデータを抽出できるPythonのライブラリ「textminer」のインストールについて解説しています。

textminer(https://github.com/cooledcoffee/textminer)は、テキストから値(values)、リスト(list)、ディクショナリ(dicts)を抽出することができます。

■Python

今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)

■textminerをインストールする

textminerをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install textminer

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、pipを使う場合にはコマンドでの切り替えを行います。

py -3.8 -m pip install textminer

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable
Collecting textminer
Downloading textminer-1.3.1.tar.gz (5.3 kB)
Collecting loggingd
Downloading loggingd-1.4.1.tar.gz (3.4 kB)
Requirement already satisfied: requests in c:\users\user_\appdata\roaming\python\python38\site-packages (from textminer) (2.25.1)
Requirement already satisfied: six in c:\users\user_\appdata\roaming\python\python38\site-packages (from textminer) (1.15.0)
Collecting decorated>=1.6.2
Downloading decorated-1.9.9.tar.gz (14 kB)
Requirement already satisfied: pyyaml>=3.11 in c:\users\user_\appdata\roaming\python\python38\site-packages (from loggingd->textminer) (5.4.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests->textminer) (1.26.5)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests->textminer) (2021.5.30)
Requirement already satisfied: idna<3,>=2.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests->textminer) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests->textminer) (4.0.0)
Collecting fixtures2>=0.1.2
Downloading fixtures2-0.1.8.tar.gz (2.9 kB)
Collecting fixtures
Downloading fixtures-3.0.0-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 1.2 MB/s
Collecting testtools>=0.9.22
Downloading testtools-2.5.0-py3-none-any.whl (181 kB)
|████████████████████████████████| 181 kB 939 kB/s
Collecting pbr>=0.11
Downloading pbr-5.6.0-py2.py3-none-any.whl (111 kB)
|████████████████████████████████| 111 kB 1.3 MB/s
Collecting extras>=1.0.0
Downloading extras-1.0.0-py2.py3-none-any.whl (7.3 kB)
Building wheels for collected packages: textminer, loggingd, decorated, fixtures2
Building wheel for textminer (setup.py) … done
Created wheel for textminer: filename=textminer-1.3.1-py3-none-any.whl size=7181 sha256=695320cbe68f8a67d20b5a9040d2bc65b84965f8e795f369c1e64c7c99b22b48
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\53\c2\99\96f890b233db037f7fefb0f7d65288209bbf02a44c6d796063
Building wheel for loggingd (setup.py) … done
Created wheel for loggingd: filename=loggingd-1.4.1-py3-none-any.whl size=4387 sha256=2b31406f785ca83a4e140bb8c279c71275bf07a2b62835bfdc3912a25c608184
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\80\87\2d\621c78853160c06ffc210927ac9160ea891fd1caec410b0245
Building wheel for decorated (setup.py) … done
Created wheel for decorated: filename=decorated-1.9.9-py3-none-any.whl size=24480 sha256=770ef0a2600b61f48d666308df406161ebe3dcd1328c9b5caec09e90fce83a03
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\77\ac\38\12a4f92f217c065c7f56d7d20b1e6a20c6dde0ec985f0c13c2
Building wheel for fixtures2 (setup.py) … done
Created wheel for fixtures2: filename=fixtures2-0.1.8-py3-none-any.whl size=4582 sha256=51733574bb0630fb72064612f49ec809fb80658e33a3c3f7ae425fd98d66d616
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheels\c5\f7\ae\8471ec28982fdb992a57255c2356cd2ec7c0e31fab112b7e2a
Successfully built textminer loggingd decorated fixtures2
Installing collected packages: extras, pbr, testtools, fixtures, fixtures2, decorated, loggingd, textminer
Successfully installed decorated-1.9.9 extras-1.0.0 fixtures-3.0.0 fixtures2-0.1.8 loggingd-1.4.1 pbr-5.6.0 testtools-2.5.0 textminer-1.3.1

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、textminerが正常にインストールされたことになります。

なお、今回はtextminerのバージョン1.3.1をインストールしました。

 

コメント

タイトルとURLをコピーしました