(머신러닝-3) 머신러닝 환경 구성
Data Analytics를 위한 환경으로 먼저 텐서플로우(Tensorflow)를 설치합니다.
텐서플로우는 구글 브레인팀에서 머신 러닝 및 딥러닝 개발을 목적으로 만든 오픈 소스 라이브러리입니다.
텐서플로우는 기본적으로 Python과 C++ 언어로 프로그램을 작성한다. 하지만 SWIG 인터페이스를 통해 JAVA, Ruby 등 다른 언어를 사용하는 것도 가능합니다.
텐서플로우는 다음과 같은 순서로 설치합니다.
1. 아나콘다 설치
프로그램 다운로드 URL: https://repo.continuum.io/archive/
URL에서 자신의 OS에 맞는 프로그램을 다운로드 받아 설치합니다.
현재 이 글을 작성하고 있는 PC는 Window10 64bit이므로 Anaconda3-4.4.0-Windows-x86_64.exe 프로그램을 설치할 것입니다.

Next 버튼을 누른다.

I Agree 버튼을 누른다.

Next 버튼을 누른다.

설치 경로를 지정하고 Next 버튼을 누른다.

Install 버튼을 누른다.

설치가 진행된다.

Next 버튼을 누른다.

Finish버튼을 눌러 설치를 완료한다.
2. 아나콘다 설치 후, 파이썬 최신 패키지로 업데이트 합니다.
Anaconda Prompt를 실행한다.

먼저 pip 를 업데이트 한다.
conda update pip

이와 같은 방식으로 다음의 명령을 수행한다.
conda update matplotlib
3. 텐서플로우 설치
같은 Anaconda Prompt 창에서 텐서플로우를 설치할 수 있습니다.
pip install tensorflow
를 실행하여 텐서플로우를 설치합니다.
텐서플로우가 설치되면 제대로 설치되었는지 확인합니다.
Anaconda Prompt에서 python을 입력한 후 다음의 코드를 실행합니다.
import tensorflow as tf hello = tf.constant('Hello Tensorflow!') sess = tf.Session() print(sess.run(hello))

텐서플로우 설치가 완료 되었습니다.
4. 파이참 설치
이번에는 텐서플로우 작업을 위한 IDE를 설치합니다.
파이참은 많은 Python 개발자들이 사용하는 IDE입니다.
사이트에 접속해서 자신의 OS에 맞는 파이참을 설치하십시요.

무료버전인 Community 버전을 설치한다. 다운로드 받은 설치파일을 실행한다.

Next를 클릭한다.

설치 위치를 지정한 후 Next 버튼을 클릭한다.

본인이 원하는 옵션을 선택한 후 Next 버튼을 클릭한다.

Install 버튼을 클릭한다.

Finish를 눌러 설치를 완료한다.
5. 텐서플로우 프로젝트 생성
파이참을 실행 한 후 Create New Project를 선택합니다.

Location 란에 프로젝트 이름을 입력 한 후 Create 버튼을 클릭합니다.
helloworld.py 파일을 만든 후 위에 텐서플로우 테스트 코드를 실행해 봅니다.

이상으로 환경 구성을 마칩니다.
댓글
댓글 쓰기