Home Python - 가상환경 만들기
Post
Cancel

Python - 가상환경 만들기

1. cmd 사용

  1. win + R
  2. cmd
    cmd_실행

  3. cd <가상환경 만들 폴더 경로>

  4. python -m venv <가상환경이름>
    cmd_가상환경

  5. 가상환경이 만들어진 모습
    가상환경이 만들어진 모습

2. Visual Studio Code(vs code) 사용

  1. vs code 하단 cmd 창 열기
    vs_code_terminal

  2. 위의 사진과 같은 모양이 없다면 메뉴 중 새로운 터미널 생성
    new_terminal

  3. py -3 -m venv <가상환경이름>
    terminal_code

  4. 가상환경이 만들어진 모습 가상환경이 만들어진 모습

3. 가상환경 실행(vs code)

  1. ctrl + shift + p

  2. Python:Select Interpreter (클릭)
    click

  3. Enter interpreter path.. (클릭)
    click

  4. Find… (클릭)
    click

  5. ..\<가상환경이름>\Scripts\python.exe » Select Interpreter
    가상환경 경로

  6. ctrl + shift + `
    가상환경 실행 완료
    사진과 같이 (가상환경이름) root>가 나오면 가상환경 실행 성공!

This post is licensed under CC BY 4.0 by the author.

Python - 제어문

Python - 유용한 함수, 함수 만들기

Comments powered by Disqus.