LoginSignup
0
0

More than 1 year has passed since last update.

Django周りの開発環境をインストールする

Posted at

はじめに

私はプログラミング歴1年の初心者です。
実務でWebサイトのコーディングを1年間行ってきました。
そろそろシステム開発もできるようになりたいということで
LaravelやReactをこれから勉強していこうと思っております。

今回の目的

今回はDjangoの環境構築方法を学んでいこうと思います。
Homebrewを使ってインストールしていきます。
本当は仮想環境を立ててインストールするほうがいいらしいのですが
今回は初めてなのでその部分は端折っていきます。

目次

  1. Pythonのインストール
  2. Djangoのインストール

実際にやってみる

Pythonのインストール

# HomebrewでPythonをインストールする
$ brew search python
$ brew install python3

# PATHの設定
$ echo "export PATH=/usr/local/bin:$PATH" >> ~/.bash_profile
$ source ~/.bash_profile

# pythonのバージョンを確認する(2系と3系が分かれている)
$ python -V
→ Python 2.7.16
$ python3 -V
→ Python 3.8.7

# pip3の中身を確認する
(pip3はpythonのパッケージマネージャで、python3と一緒にインストールされている。)
$ pip3 list

Djangoのインストール

# pipでDjangoをインストールする
$ python3 -m pip install Django

# Djangoのバージョン確認
$ python3
>>> import django
>>> django.get_version()

一旦ここで終了しておきます。

0
0
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
0
0