본문 바로가기

IT관련정보/파이썬(Python)-Ver3.6.1

※파이썬 관련 셋팅

※파이썬 관련 셋팅


1.파이썬 설치 3.7.1 (https://www.python.org/downloads/release/python-371/)


해당 경로에 있는 Windows x86-64 executable installer 클릭해서 python-3.6.1-amd64.exe 파일 다운로드

다운로드 완료되면 실행

빨간줄(Add Python 3.7 to PATH) 체크하고 Install Now 클릭

완료.

확인작업으로 cmd -> python입력해본다. 다음과 같은 화면이 나오면 설치완료

 



2.아나콘다 설치(https://www.anaconda.com/download/#windows)

:데이터 분석에 유용한 라이브러리가 많이 포함된 배포판(data science platform)


해당 경로에 있는 Python 3.7 version Download를 클릭해서 파일을 다운받는다.


1.Just Me선택 이후 에러뜨면(계정이름 한글일경우) All Users로 선택

마지막 체크 둘다 해제 - 설치완료.

 

확인작업으로 cmd -> python 입력해본다. 다음과 같이 나오면 완료

 

*Anaconda Prompt 에서 명령어 (참조:http://niceman.tistory.com/90?category=940952)


라이브러리 설치

pip install numpy

pip install pandas

pip install matplotlib

pip install jupyter


1)conda --version(아나콘다 버전확인)
2)conda update conda(아나콘다 업데이트)

3)conda create --name test python=3.7(가상환경 생성)

4)conda info --envs(전체 가상환경 리스트)

5)activate 가상환경명(가상환경 활성화)

6)conda install simplejson

7)deactivate 가상환경명(가상환경 비활성화)

8)conda list(콘다 패키지 리스트) -가상환경 활성화 후 입력하면 해당 가상환경 패키지 리스트 보임

9)conda remove --name test --all(가상환경 삭제) -activate root로 들어가서 삭제하는게 좋음

10)Tensorflow 설치(가상환경 생성&설치)

anaconda create --name tensorflow python = 3.5 tensorflow (3.7버전 없어서 3.5로 설치)


11)Jupyter Notebook 설치 - 데이터 분석 결과 시각화 

*아나콘다 가상화면 활성화 해야됨

activate tensorflow 로 가상환경 접속 후 pip install jupyter 설치 

에러날경우 python -m pip install --upgrade pip 실행후 설치

jupyter notebook 입력


해당 경로로 들어가서 소스를 넣고 Run 했을때 Hello 문구뜨면 셋팅완료


import tensorflow as tf


hello = tf.constant('Hello, TensorFlow!')


sess = tf.Session()


print(sess.run(hello))



'IT관련정보 > 파이썬(Python)-Ver3.6.1' 카테고리의 다른 글

※클래스(변수와메서드)  (0) 2018.09.24
※변수명 규칙  (0) 2018.09.23