모두의 딥러닝 책을 참고로 작성했습니다.
아나콘다를 설치하기 위해서 아래 페이지에 접속합니다.
https://www.anaconda.com/distribution/
Anaconda Python/R Distribution - Free Download
Anaconda Distribution is the world's most popular Python data science platform. Download the free version to access over 1500 data science packages and manage libraries and dependencies with Conda.
www.anaconda.com
밑으로 이동하면 다음과 같은 화면이 나옵니다.
여기서 python 3.7부분에서 64bit를 눌러서 다운로드 하겠습니다.
다운이 완료되면 설치파일을 실행합니다.
기본설정 변경하지 않고 next 버튼을 실행합니다.
설치가 종료되면 Anaconda Prompt 실행시켜 작업 환경을 tutorial이란 이름으로 생성하여 저장합니다.
conda create -n tutorial python=3.5 numpy scipy matplotlib spyder pandas seaborn scikit-learn h5py
tutorial : 작업 환경 이름
python=3.5 : 파이썬 버전
numpy scipy matplotlib spyder pandas seaborn scikit-learn h5py : 교재에서 사용되는 모든 파이썬 라이브러리의 이름
밑에와 같은 화면이 나오며 proceed[y/n]이라는 질문이 나타나면 y를 입력하고 enter를 우릅니다.
텐서플로 설치하기
아나콘다 명령 프롬프트에서 activate tutorial이라고 입력하고 enter를 누릅니다.
앞부분 (base)에서 (tutorial)으로 변경되었네요
pip install tensorflow
여기서 오류가 발생했습니다.
pip 업그레이드가 필요한것으로 보여서 업그레이드 명령어를 실행했습니다.
python -m pip install --upgrade pip
뭔가 설치가 되다가 만 느낌이 이지만 다시 텐서플로 설치를 진행 합니다.
하지만 다시 오류 발생했습니다.
그래서 이번에는 관리자권한으로 prompt를 실행해서 실행했더니
python -m pip install --upgrade pip
이제야 pip가 제대로 업그레이드 되고 다시 텐서플로를 설치합니다.
텐서플로 설치 중간에 에러가 발생했습니다.ㅠㅠ
ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
검색해서 대부분 밑에와 같은 형식으로 되어있길래 똑 같이 해봤지만 결국 같은 에러 발생..
conda update --all
pip install --upgrade tensorflow==2.0.0-beta1
다시 에러..
처음 base 계정에서 업데이트를 실행
텐서플로도 설치 완료되었습니다.
python으로 tensorflow 버전확인
파이썬으로 직접 실행해서 확인해보겠습니다.
python
import tensorflow as tf
print(tf.__version__)
종료는 exit(0)으로 나올 수 있습니다.
tutorial으로 하면 다시 되지 않아서 처음 python 버전을 설치 버전으로 올렸습니다.
conda create -n tutorial python=3.7 numpy scipy matplotlib spyder pandas seaborn scikit-learn h5py
케라스 설치하기
pip install keras
케라스 설치 확인
python
import keras 입력시
Using TensorFlow backend가 나오면 설치 성공
'언어 > python(파이썬)' 카테고리의 다른 글
[python - requests] 텔레그램 API를 이용한 이미지 파일 업로드 (0) | 2024.04.17 |
---|---|
ImportError: cannot import name 'InlineKeyboardMarkup' (0) | 2020.06.04 |