webmaster-kazu.com

テクノロジー・データ分析・実践ログ・その他

Python用のシンプルなJSONベースの軽量データベース「pysondb」のインストール

カテゴリ: Python【初歩から現場実務的なもの】

Python用のシンプルなJSONベースの軽量データベース「pysondb」のインストールについて解説しています。

「pysondb(https://github.com/pysonDB/pysonDB)」は、軽量で効率的なJSONベースのデータベースです。JSONベースとなるため、画像や動画などは保存できません。

■Python

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

■pysondbをインストールする

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

pip install pysondb

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

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、バージョンの切り替えを行います。

py -3.8 -m pip install pysondb

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

Defaulting to user installation because normal site-packages is not writeable

Collecting pysondb

Downloading pysondb-1.6.4-py3-none-any.whl (12 kB)

Collecting beautifultable

Downloading beautifultable-1.0.1-py2.py3-none-any.whl (27 kB)

Requirement already satisfied: filelock in c:\users\user_\appdata\roaming\python\python37\site-packages (from pysondb) (3.3.1)

Collecting wcwidth

Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)

Installing collected packages: wcwidth, beautifultable, pysondb

WARNING: The script pysondb.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python37\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed beautifultable-1.0.1 pysondb-1.6.4 wcwidth-0.2.5

WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.

You should consider upgrading via the 'c:\program files (x86)\python37-32\python.exe -m pip install --upgrade pip' command.

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、pysondbが正常にインストールされたことになります。今回行ったインストールでは「WARNING」が表示されていますが、警告であり、エラーではないので、一旦無視しています。

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