본문 바로가기
자료처리

파이썬 라이브러리(matplotlib) 설치

by Prof. Sung-Deuk Choi 2022. 4. 23.

이전 글에서 소개한 주피터 노트북을 사용할 경우에는 별도로 matplotlib와 같은 라이브러리를 설치하지 않아도 되지만, 파이썬을 설치하고 파이참이나 비주얼 스튜디오 코드를 에디터로 사용할 때는 라이브러리를 별도로 설치해야 합니다.

파이썬 & 아나콘다(주피터 노트북) 설치

파이썬 설치 아래 사이트에서 최신 버전(3.10.2) 다운로드 하면 간단히 설치할 수 있습니다. Welcome to Python.org Welcome to Python.org The official home of the Python Programming Language www.python.org..

eacl.tistory.com


python-3.10.4-amd64.exe 파일을 실행하면 아래 창이 열리는데 맨 아래에 PATH를 선택하고 Install Now를 클릭합니다.

설치가 끝나면 아래 창이 뜹니다.

cmd 명령 프롬프트 창을 열고 pip install matplotlib를 입력한 후에 엔터를 누릅니다.

matplotlib뿐만 아니라 자료해석에 필요한 기본 라이브러리가 자동으로 설치되었습니다.


비주얼 스튜디오 코드에 산점도 예시 코드를 입력하고 실행했습니다. matplotlib 라이브러리가 잘 설치되어 예제와 같은 그래프가 만들어졌습니다.

scatter(x, y) — Matplotlib 3.5.1 documentation

Note Click here to download the full example code

matplotlib.org

비주얼 스튜디오 코드는 아래 사이트에서 무료로 다운 받으면 됩니다.

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

댓글