티스토리 뷰

1. Visual Studio 에서 파이썬 패키지 설치 방법 

1) Visual Studio에서 파이썬 패키지 설치 방법은?

제가 사용하는 방법은 Visual Studio에서 제공하는 Command Window를 사용하는 방법입니다.
Visual Studio Code를 사용할때 여러 가지 방법을 사용해 봤지만 환경에 따라 오류를 발생하는 경우가 많았습니다. 
여러번의 경험 끝에 가장 쉬운 방법은 아래와 같습니다. 

Visual Studio를 실행 합니다. 

지난 강의에서 작성한 프로그램을 더블 클릭합니다. 오른쪽 상단의 Solution Explorer를 확장해 보면 아래와 같은 화면을 볼수 있습니다. 이곳에 pip와 setuptools패키지가 설치되어 있음을 알 수 있습니다. 

env1 트리노드에서 마우스를 오른쪽 클릭하면 아래 화면을 볼 수 있습니다. 

이곳에서 Open Command Prompt Here를 클릭하면 아래의 Command Window가 나타납니다.  자세히 보시면 알겠지만 Command Window의 경로가 저희가 실행중인 프로젝트의 환경설정 경로와 동일합니다. 즉 프로젝트별로 가상환경을 설정해 준다는 것을 알 수가 있습니다. 가상환경이라고 표현을 하기도 하지만, 쉽게 생각하면 프로젝트 종속적으로 환경을 설정가능하다고 생각하시면 됩니다. 이곳에서 pip 명령을 사용하여 필요한 패키지를 설치하면 됩니다. 

2) pip Package의 Upgrade 

Python은 계속해서 자주 업데이트가 되고 있어서 pip Package를 우선 Upgrade 하고 시작하는 것이 좋습니다. 
Upgrade Command는 매우 쉽습니다. 

Command Window에서
python -m pip install --upgrade pip

위 명령을 실행하면 아래와 같은 내용을 얻을 수 있습니다. 

설치되 내용을 확인하기 위해서는 pip list 나 pip --version을 이용해서 확인할 수 있습니다.  

2. 데이터 분석용 패키지 소개와 설치

1) SciPy

- 분류: 과학 기술 함수 라이브러리
- 개발: 2001, Travis Oliphant, Pearu Peterson
- 홈페이지: http://www.scipy.org 

 

SciPy.org — SciPy.org

 

www.scipy.org

- 소개: 고급 수학함수, 수치적 미적분, 비분 방정식 계산, 최적화, 신호처리 등의 다양한 과학 기술 계산 기능을 제공하는 라이브러리다. 
- 설치 명령어: pip install scipy
- 업그레이드 명령어: pip install scipy --upgrade 
- 삭제 명령어: pip uninstall scipy

2) Matplotlib

- 분류: 시각화 라이브러리, Matlag 플롯기능 구현 
- 개발: 2002, John D. Hunter
- 홈페이지: http://matplotlib.org 

 

Matplotlib: Python plotting — Matplotlib 3.1.1 documentation

Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts, the Python and IPython shells, the Jupyter noteb

matplotlib.org

- 소개: 그래프나 챠트등 시각화 기능을 제공하는 라이브러리다. 
- 설치 명령어: pip install matplotlib
- 업그레이드 명령어: pip install matplotlib --upgrade
- 삭제 명령어: pip uninstall matplotlib

3) NumPy

- 분류: 수치해석용 라이브러리 
- 개발: 2005, Travis Oliphant
- 홈페이지: http://www.numpy.org 

 

NumPy — NumPy

NumPy NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object sophisticated (broadcasting) functions tools for integrating C/C++ and Fortran code useful linear algebra, Fo

numpy.org

- 소개: 고정형 다차원 배열과 벡트화 연산을 기본으로 하는 수치 해석 및 선형대수 계산 기능용 라이브러리다.
- 설치 명령어: pip install numpy
- 업그레이드 명령어: pip install numpy --upgrade
- 삭제 명령어: pip uninstall numpy

4) SymPy

- 분류: 심볼릭 연산 라이브러리 
- 개발: 2006,  Ondřej Čertík
- 홈페이지: http://www.sympy.org

 

https://www.sympy.org/

 

www.sympy.org

- 소개: 인수분해, 미분, 적분등 심볼릭 연산 기능을 제공하는 라이브러리이다. 
- 설치 명령어: pip install sympy
- 업그레이드 명령어: pip install sympy --upgrade
- 삭제 명령어: pip uninstall sympy

5) Pandas

- 분류: 데이터 분석용 라이브러리
- 개발: 2006, Wes McKinney(AQR Capital Management)
- 홈페이지: http://pandas.pydata.org 

 

Python Data Analysis Library — pandas: Python Data Analysis Library

Python Data Analysis Library pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. pandas is a NumFOCUS sponsored project. This will help ensure t

pandas.pydata.org

- 소개: 데이터프레임(DataFrame) 을 사용하여, 자료의 탐색이나 정리에 필요한 기능을 제공하는 라이브러리이다. 
- 설치 명령어: pip install pandas
- 업그레이드 명령어: pip install pandas --upgrade
- 삭제 명령어:  pip uninstall pandas

6) Scikit-Learn

- 분류: 머신러닝 라이브러리
- 개발: 2007, David Cournapeau
- 홈페이지: http://scikit-learn.org 

 

scikit-learn: machine learning in Python — scikit-learn 0.16.1 documentation

 

scikit-learn.org

- 소개: 대부분의 머신러닝 모델을 제공하는 라이브러리이다. 
- 설치 명령어: pip install scikit-learn
- 업그레이드 명령어: pip install scikit-learn --upgrade
- 삭제 명령어: pip uninstall scikit-learn

7) StatsModels

- 분류: 통계 및 회귀분석, 시계열 분석 라이브러리
- 개발: 2009, Skipper Seabold
- 홈페이지: http://www.statsmodels.org 

 

http://www.statsmodels.org

 

www.statsmodels.org

- 소개: 통계 및 회귀 분석이나 시계열 분석에 필요한 기능을 제공하는 라이브러리이다. 
- 설치 명령어: pip install statsmodels
- 업그레이드 명령어: pip install statsmodels --upgrade
- 삭제 명령어: pip uninstall statsmodels

8) Seaborn

- 분류: 시각화 라이브러리, 통계 차트 및 컬러맵 기능 제공
- 개발: 2012, Michael Waskom
- 홈페이지: http://seaborn.pydata.org 

 

seaborn: statistical data visualization — seaborn 0.9.0 documentation

Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics. For a brief introduction to the ideas behind the library, you can read the introductory note

seaborn.pydata.org

- 소개: Matplotlib가 설치되어야 하고 Matplotlib가 지원하지 않는 고급 통계 차트 기능을 제공하는 라이브러리이다. 
- 설치 명령어: pip install seaborn
- 업그레이드 명령어: pip install seaborn --upgrade
- 삭제 명령어: pip uninstall seaborn

9) pgmpy

- 소개: 확률론적 그래프 모형
- 개발: 2013, Ankur Ankan
- 홈페이지: http://pgmpy.org 

 

Welcome to pgmpy’s documentation! — pgmpy 0.1.2 documentation

 

pgmpy.org

- 소개: 확률론적 그래프 모형을 구현하는 라이브러리이다. 
- 설치 명령어: pip install pgmpy
- 업그레이드 명령어: pip install pgmpy --upgrade
- 삭제 명령어: pip uninstall pgmpy

10)TensorFlow

- 분류: 딥러닝 라이브러리
- 개발: 2015, Google
- 홈페이지: https://www.tensorflow.org 

 

TensorFlow

엔드 투 엔드 오픈소스 머신러닝 플랫폼

www.tensorflow.org

- 소개: 심볼릭연산, 그래프 연산, GPGPU 연산등의 기능을 제공하는 딥러닝 라이브러리이다. 
- 설치 명령어: pip install tensorflow
- 업그레이드 명령어: pip install tensorflow --upgrade
- 삭제 명령어: pip uninstall tensorflow

11) Keras

- 분류: 고수준 딥러닝 라이브러리
- 개발: 2015,  François Chollet
- 홈페이지: https://keras.io

 

Home - Keras Documentation

Keras: The Python Deep Learning library You have just found Keras. Keras is a high-level neural networks API, written in Python and capable of running on top of TensorFlow, CNTK, or Theano. It was developed with a focus on enabling fast experimentation. Be

keras.io

- 소개: TensorFlow의 설치가 되어야 하며, 고수준의 신경망을 쉽게 구현하는 기능을 제공하는 라이브러리이다. 
- 설치 명령어: pip install keras
- 업그레이드 명령어: pip install keras --upgrade
- 삭제 명령어: pip uninstall keras

12) PyTorch

- 분류: 딥러닝 라이브러리 
- 개발: 2016, Facebook
- 홈페이지: https://pytorch.org/

 

PyTorch

An open source deep learning platform that provides a seamless path from research prototyping to production deployment.

pytorch.org

- 소개: Torch 딥러닝 라이브러리를 기반으로 TensorFlow와 같은 저수준부터 Keras와 같은 고수준 기능을 제공하는 라이브러리이다. 
- 설치 명령어: pip3 install torch==1.3.1 torchvision===0.4.2 -f https://download.pytorch.org/whl/torch_stable.html
- 삭제 명령어: pip uninstall torch

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/03   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
글 보관함