재우니 개발자 블로그

 

 

venv 로 가상화를 하여 구성할 수도 있지만, 

Hacker News 프로젝트
가상환경 생성: python3.13 -m venv .hacker_news
가상환경 적용
source .hacker_news/bin/activate
.hacker_news\Scripts\activate
Django 설치: pip install django
루트 디렉토리 생성: mkdir hacker_news
Django 프로젝트 생성: django-admin startproject config hacker_news
프로젝트로 이동: cd hacker_news
Django 서버 실행: python manage.py runserver

 

아래 처럼 uv 를 사용해서도 가상화 환경을 구성할 수 있습니다.

 

 

1. uv 설치

 

D:\Source\PythonProject\example>pip install uv

 

2. 가상환경 생성 및 활성화

 

D:\Source\PythonProject\example>uv venv .hacker_news

 

D:\Source\PythonProject\example>.hacker_news\Scripts\activate

 

 

3. Django 설치

 

(.hacker_news) D:\Source\PythonProject\example>uv pip install django

 

4. 프로젝트 디렉토리 생성

 

(.hacker_news) D:\Source\PythonProject\example>mkdir hacker_news

 

5. Django 프로젝트 생성

 

(.hacker_news)D:\Source\PythonProject\example>django-admin startproject config hacker_news

 

6. 프로젝트 디렉토리로 이동

 

(.hacker_news) D:\Source\PythonProject\example>cd hacker_news

 

7. Django 개발 서버 실행

 

(.hacker_news) D:\Source\PythonProject\example\hacker_news>python manage.py runserver

 

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
July 06, 2025 - 12:24:58
Django version 5.2.4, using settings 'config.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

WARNING: This is a development server. Do not use it in a production setting. Use a production WSGI or ASGI server instead.
For more information on production servers see: https://docs.djangoproject.com/en/5.2/howto/deployment/
[06/Jul/2025 12:25:30] "GET / HTTP/1.1" 200 12068
Not Found: /favicon.ico
[06/Jul/2025 12:25:30] "GET /favicon.ico HTTP/1.1" 404 2208