属性でPythonオブジェクトを検索するためのコンテナを作れる「filterbox」のインストール

スポンサーリンク

属性でPythonオブジェクトを検索するためのコンテナを作れる「filterbox」のインストールについて解説しています。

「filterbox(https://github.com/manimino/filterbox/)」は、ODBCデータベースへのアクセスを簡単にするオープンソースのPythonモジュールです。

■Python

今回のPythonのバージョンは、「Python 3.9.13」を使用しています。(Windows10)

■仮想環境の構築

「filterbox」のインストールしてみますが、その前に仮想環境の構築を行い、インストールを行います。そのために、まずはWindows10のコマンドプロンプトを起動します。

C:\Users\user_>mkdir filter

起動後、上記のコマンドを入力し、Enterキーを押します。「mkdir」コマンドで「filter」ディレクトリを作成します。

C:\Users\user_>cd filter

作成後、上記のコマンドを入力し、Enterキーを押します。「cd」コマンドで「filter」ディレクトリ内に移動します。

C:\Users\user_\filter>py -3.9 -m venv .venv

移動後、上記のコマンドを入力し、Enterキーを押します。本来だと「python -m venv .venv」で仮想環境のディレクトリ「.venv」を作成しますが、今回はPythonのバージョンを指定しています。なお、今回仮想環境のディレクトリ名は「.venv」としていますが、ご自身で変更は可能です。

Enterキーを押すと、何も出力されませんが、これで仮想環境の作成が完了となります。

■仮想環境への切り替え

C:\Users\user_\filter>.venv\Scripts\activate.bat

完了後、上記のコマンドを入力し、Enterキーを押します。仮想環境のディレクトリ内に作成された activateスクリプトを実行し、仮想環境に入ります。

(.venv) C:\Users\user_\filter>

Enterキーを押すと、「(.venv)」と表示されます。これで仮想環境に入ることができました。

■filterboxのインストール

(.venv) C:\Users\user_\filter>pip install filterbox

仮想環境に入った後に、上記のコマンドを入力し、Enterキーを押します。これでpipを経由してfilterboxをインストールします。

Collecting filterbox
Downloading filterbox-0.6.2-py3-none-any.whl (19 kB)
Collecting cykhash<3.0.0,>=2.0.0
Using cached cykhash-2.0.0.tar.gz (43 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting sortednp<0.5.0,>=0.4.0
Using cached sortednp-0.4.0.tar.gz (36 kB)
Preparing metadata (setup.py) ... done
Collecting numpy<2.0,>=1.14
Downloading numpy-1.23.1-cp39-cp39-win_amd64.whl (14.7 MB)
---------------------------------------- 14.7/14.7 MB 4.3 MB/s eta 0:00:00
Using legacy 'setup.py install' for sortednp, since package 'wheel' is not installed.
Building wheels for collected packages: cykhash
Building wheel for cykhash (pyproject.toml) ... done
Created wheel for cykhash: filename=cykhash-2.0.0-cp39-cp39-win_amd64.whl size=472654 sha256=845eec5f1612dc1ccf85571231b6df87a8ccb55ac0c6eab266273522dec14d66
Stored in directory: c:\users\user_\appdata\local\pip\cache\wheelsa\f3\edea0011c059a01a5fb92af758e1cd5b3fcb006a5f247032f5
Successfully built cykhash
Installing collected packages: cykhash, numpy, sortednp, filterbox
Running setup.py install for sortednp ... done
Successfully installed cykhash-2.0.0 filterbox-0.6.2 numpy-1.23.1 sortednp-0.4.0
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the 'C:\Users\user_\filter\.venv\Scripts\python.exe -m pip install --upgrade pip' command.

Enterキーを押すと、インストールが開始され、「Successfully installed(正常にインストールされました)」と出力されます。これが出力されればインストールは完了となります。

今回はfilterboxのバージョン0.6.2をインストールしました。

コメント

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