LoginSignup
5
9

More than 5 years have passed since last update.

djangoのインストール(Mac)

Last updated at Posted at 2018-02-13

前提条件

MacまたはLinux
pythonインストール済み

バージョンを決める

https://www.djangoproject.com/download/
ここからインストールするバージョンを決めましょう。

今回はLTS(長期サポート)の最新(2018/2現在)である1.11をインストールします。

pipのインストール

pipとはpythonのパッケージ管理ツールです。

$ pip --version
pip 9.0.1 from /Users/user/.pyenv/versions/3.6.0/lib/python3.6/site-packages (python 3.6)

※python3.4以降はpipが付いています

なければcurlで入れましょう。

curl -kL https://bootstrap.pypa.io/get-pip.py | python

djangoのインストール

$ pip install django==1.11

バージョン確認

$ python
Python 3.6.0 (default, Jan  9 2018, 17:49:17)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.get_version()
'1.11'
5
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
9