0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Django環境構築メモ(venvバージョン)

Last updated at Posted at 2025-04-17

Djangoバージョン確認

Djangoの最新バージョン確認

現時点で最新の5.2を使用(Pythonは3.13.3を使用)

Pythonバージョン設定

# イントールできるバージョンの確認
pyenv install --list

# インストール
pyenv install 3.13.3

# インストールされたバージョンの確認
pyenv versions

# バージョンの指定
# システム全体
pyenv global 3.13.3

プロジェクトディレクトリ作成 & Python仮想環境作成

# プロジェクトディレクトリ作成、移動
mkdir django-project && cd django-project

# Python仮想環境作成
python -m venv .venv

# 仮想環境活性化
source .venv/bin/activate

# 仮想環境化確認
which python

Djangoインストール

# pip 準備
python -m pip install --upgrade pip
python -m pip --version

# Django インストール
python -m pip install django

# Django のバージョン確認(インストールできたか確認)
python -m django --version

Djangoアプリ作成 & 開発サーバー起動

python -m django startproject mysite .

python manage.py runserver

http://127.0.0.1:8000/にブラウザでアクセス

スクリーンショット 2025-04-17 22.29.44.png

Done!!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?