【Python】Markdownを使用したプロジェクトドキュメントを構築できる「mkdocs」のインストール

スポンサーリンク

Markdownを使用したプロジェクトドキュメントを構築できる「mkdocs」のインストールについて解説しています。

「mkdocs(https://www.mkdocs.org/,https://github.com/mkdocs/mkdocs)」は、プロジェクトドキュメントの構築を目的とした高速でシンプルな静的サイトジェネレーターです。

■Python

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

■mkdocsをインストールする

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

pip install mkdocs

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

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

py -3.9 -m pip install mkdocs

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

Defaulting to user installation because normal site-packages is not writeable
Collecting mkdocs
Downloading mkdocs-1.5.2-py3-none-any.whl (3.7 MB)
|████████████████████████████████| 3.7 MB 1.3 MB/s
Collecting click>=7.0
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Collecting pathspec>=0.11.1
Downloading pathspec-0.11.2-py3-none-any.whl (29 kB)
Collecting jinja2>=2.11.1
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Requirement already satisfied: importlib-metadata>=4.3 in c:\users\user_\appdata\roaming\python\python39\site-packages (from mkdocs) (6.8.0)
Requirement already satisfied: markupsafe>=2.0.1 in c:\users\user_\appdata\roaming\python\python39\site-packages (from mkdocs) (2.1.3)
Collecting mergedeep>=1.3.4
Downloading mergedeep-1.3.4-py3-none-any.whl (6.4 kB)
Collecting pyyaml>=5.1
Using cached PyYAML-6.0.1-cp39-cp39-win_amd64.whl (152 kB)
Requirement already satisfied: markdown>=3.2.1 in c:\users\user_\appdata\roaming\python\python39\site-packages (from mkdocs) (3.4.4)
Collecting ghp-import>=1.0
Downloading ghp_import-2.1.0-py3-none-any.whl (11 kB)
Collecting platformdirs>=2.2.0
Downloading platformdirs-3.10.0-py3-none-any.whl (17 kB)
Requirement already satisfied: packaging>=20.5 in c:\users\user_\appdata\roaming\python\python39\site-packages (from mkdocs) (23.1)
Requirement already satisfied: colorama>=0.4 in c:\users\user_\appdata\roaming\python\python39\site-packages (from mkdocs) (0.4.6)
Collecting pyyaml-env-tag>=0.1
Downloading pyyaml_env_tag-0.1-py3-none-any.whl (3.9 kB)
Collecting watchdog>=2.0
Using cached watchdog-3.0.0-py3-none-win_amd64.whl (82 kB)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\user_\appdata\roaming\python\python39\site-packages (from ghp-import>=1.0->mkdocs) (2.8.2)
Requirement already satisfied: zipp>=0.5 in c:\users\user_\appdata\roaming\python\python39\site-packages (from importlib-metadata>=4.3->mkdocs) (3.16.2)
Requirement already satisfied: six>=1.5 in c:\users\user_\appdata\roaming\python\python39\site-packages (from python-dateutil>=2.8.1->ghp-import>=1.0->mkdocs) (1.16.0)
Installing collected packages: pyyaml, watchdog, pyyaml-env-tag, platformdirs, pathspec, mergedeep, jinja2, ghp-import, click, mkdocs
WARNING: The script watchmedo.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\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.
WARNING: The script ghp-import.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\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.
WARNING: The script mkdocs.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python39\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 click-8.1.7 ghp-import-2.1.0 jinja2-3.1.2 mergedeep-1.3.4 mkdocs-1.5.2 pathspec-0.11.2 platformdirs-3.10.0 pyyaml-6.0.1 pyyaml-env-tag-0.1 watchdog-3.0.0
WARNING: You are using pip version 21.2.4; however, version 23.2.1 is available.
You should consider upgrading via the 'C:\Program Files\Python39\python.exe -m pip install --upgrade pip' command.

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

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

コメント

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