> For the complete documentation index, see [llms.txt](https://code4history.gitbook.io/chime/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code4history.gitbook.io/chime/open-source/making-your-own-chime-app/building-the-app-locally.md).

# ローカル環境でのアプリケーションのビルド

コードは入手しました。マシン上でどのように実行すればよいですか？

### Pythonでの実行 <a href="#running-in-python" id="running-in-python"></a>

このアプリケーションを使用するには、Python 3.6以上が必要です。 コマンドプロンプトツールを使用して、お使いのマシンに[搭載されているPythonのバージョン](https://note.nkmk.me/en/python-sys-platform-version-info/)を確認してください。

参考までに、Macにはデフォルトでpython 2.7がインストールされています。 python --versionを実行すると、新しいバージョンがインストールされていても2.7になる可能性があります。[こちらの記事で、Macでpythonを管理する方法が紹介されています。](https://docs.python-guide.org/starting/install3/osx/)

#### python の独自環境を作る <a href="#create-your-python-environment" id="create-your-python-environment"></a>

早速やってみましょう。アプリケーションで使用するパッケージをすべてマシンの標準環境にインストールしないようにするには、`pipenv`を使用します。

まず、pipenvを[インストール](https://pipenv.pypa.io/en/latest/#install-pipenv-today)します。

[こちら](https://pipenv-fork.readthedocs.io/en/latest/basics.html#example-pipenv-workflow)が、手順を一通り進めるためのガイドになります。

### Dockerでの実行 <a href="#running-in-docker" id="running-in-docker"></a>

また、アプリケーションは「コンテナ化」されているので、マシンに何もインストールしなくても（Dockerを除く）、Dockerというツールでアプリケーションを動かすことができるようになっています。

Dockerを使うメリットは、Python環境をクリーンに保てることです。 Pythonはローカルマシン上で[管理するには厄介なツール](https://snarky.ca/why-you-should-use-python-m-pip/)であり、ほとんどのPythonベースのアプリケーションはPythonパッケージを必要とします。 Dockerはこれらのパッケージをコンテナにインストールし、あなたのマシン上でコンテナをビルドして実行します。

[こちらがDockerの基本的なインストールガイドです。](https://docs.docker.com/install/)

個人のマシンでアプリケーションを実行するためのガイダンスについては、「[Getting Started: Run Locally](https://codeforphilly.github.io/chime/getting-started/run-locally.html)」を参照してください。

[原文](https://code-for-philly.gitbook.io/chime/open-source/making-your-own-chime-app/building-the-app-locally)
