Computer/Deep Learning

DL 환경 세팅 => Tensorflow 설치!

Basha 2022. 11. 2. 11:10
728x90

D 드라이브에서 dl-dev 폴더 만들기

(base) C:\Windows\system32>d:

(base) D:\>cd big15

(base) D:\big15>dir/w
 D 드라이브의 볼륨에는 이름이 없습니다.
 볼륨 일련 번호: AC91-51DF

 D:\big15 디렉터리

[.]                                                      [..]
[assignment]                                             [dl-dev]
[java-dev]                                               [jsp-dev]
Korean_Proverbs.xlsx                                     [ml-dev]
Most_Common_Korean_Idomatic_Expression_For_Topik2.xlsx   [pandas-dev]
[python-dev]                                             [sts-dev]
[web-dev]                                                [교안]
[마인드맵]
               2개 파일             108,545 바이트
              13개 디렉터리  503,706,386,432 바이트 남음

(base) D:\big15>mkdir dl-dev

dl-dev 폴더로 이동 후 workspace, data 폴더 생성

(base) D:\big15>cd dl-dev

(base) D:\big15\dl-dev>dir
 D 드라이브의 볼륨에는 이름이 없습니다.
 볼륨 일련 번호: AC91-51DF

 D:\big15\dl-dev 디렉터리

2022-11-02  오전 10:43    <DIR>          .
2022-11-02  오전 10:43    <DIR>          ..
               0개 파일                   0 바이트
               2개 디렉터리  503,706,386,432 바이트 남음

이렇게 생성되었다.

 D:\big15\dl-dev 디렉터리

[.]         [..]        [data]      [workspace]
               0개 파일                   0 바이트
               4개 디렉터리  503,706,386,432 바이트 남음

conda env list

conda create -n tf2 python=3.8 설치

tf2 에 기본 라이브러리 설치 (conda activate tf2)
pip install numpy pandas matplotlib seaborn 

(base) D:\big15\dl-dev>conda activate tf2

(tf2) D:\big15\dl-dev>

## 기본 라이브러리 설치 하기
(tf2) D:\big15\dl-dev>pip install numpy pandas matplotlib seaborn

pip install jupyter notebook 설치

 

주피터에 가상환경 설치

python -m ipykernel install --user --name tf2 --display-name "Tensorflow2.x"

(tf2) D:\big15\dl-dev>python -m ipykernel install --user --name tf2 --display-name "Tensorflow2.x"
Installed kernelspec tf2 in C:\Users\TJ\AppData\Roaming\jupyter\kernels\tf2

tensorflow 설치

pip install tensorflow => cpu version (gpu는 pip install tensorflow-gpu 해야함 하지만 오늘은 cpu로 갈거임)

더보기

설치 완~

(tf2) D:\big15\dl-dev>pip install tensorflow
Collecting tensorflow
  Downloading tensorflow-2.10.0-cp38-cp38-win_amd64.whl (455.9 MB)
     ---------------------------------------- 455.9/455.9 MB 1.9 MB/s eta 0:00:00
Collecting tensorboard<2.11,>=2.10
  Downloading tensorboard-2.10.1-py3-none-any.whl (5.9 MB)
     ---------------------------------------- 5.9/5.9 MB 22.0 MB/s eta 0:00:00
Collecting keras-preprocessing>=1.1.1
  Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
     ---------------------------------------- 42.6/42.6 kB 2.2 MB/s eta 0:00:00
Collecting absl-py>=1.0.0
  Downloading absl_py-1.3.0-py3-none-any.whl (124 kB)
     ---------------------------------------- 124.6/124.6 kB 304.9 kB/s eta 0:00:00
Collecting protobuf<3.20,>=3.9.2
  Downloading protobuf-3.19.6-cp38-cp38-win_amd64.whl (896 kB)
     ---------------------------------------- 896.1/896.1 kB 18.8 MB/s eta 0:00:00
Requirement already satisfied: numpy>=1.20 in d:\anaconda3\envs\tf2\lib\site-packages (from tensorflow) (1.23.4)
Collecting libclang>=13.0.0
  Downloading libclang-14.0.6-py2.py3-none-win_amd64.whl (14.2 MB)
     ---------------------------------------- 14.2/14.2 MB 16.0 MB/s eta 0:00:00
Collecting grpcio<2.0,>=1.24.3
  Downloading grpcio-1.50.0-cp38-cp38-win_amd64.whl (3.7 MB)
     ---------------------------------------- 3.7/3.7 MB 11.1 MB/s eta 0:00:00
Collecting wrapt>=1.11.0
  Downloading wrapt-1.14.1-cp38-cp38-win_amd64.whl (35 kB)
Collecting typing-extensions>=3.6.6
  Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting astunparse>=1.6.0
  Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting google-pasta>=0.1.1
  Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)
     ---------------------------------------- 57.5/57.5 kB 3.0 MB/s eta 0:00:00
Collecting termcolor>=1.1.0
  Downloading termcolor-2.1.0-py3-none-any.whl (5.8 kB)
Collecting tensorflow-io-gcs-filesystem>=0.23.1
  Downloading tensorflow_io_gcs_filesystem-0.27.0-cp38-cp38-win_amd64.whl (1.5 MB)
     ---------------------------------------- 1.5/1.5 MB 11.8 MB/s eta 0:00:00
Collecting flatbuffers>=2.0
  Downloading flatbuffers-22.10.26-py2.py3-none-any.whl (26 kB)
Collecting opt-einsum>=2.3.2
  Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB)
     ---------------------------------------- 65.5/65.5 kB 442.0 kB/s eta 0:00:00
Requirement already satisfied: six>=1.12.0 in d:\anaconda3\envs\tf2\lib\site-packages (from tensorflow) (1.16.0)
Requirement already satisfied: packaging in d:\anaconda3\envs\tf2\lib\site-packages (from tensorflow) (21.3)
Collecting gast<=0.4.0,>=0.2.1
  Downloading gast-0.4.0-py3-none-any.whl (9.8 kB)
Requirement already satisfied: setuptools in d:\anaconda3\envs\tf2\lib\site-packages (from tensorflow) (65.5.0)
Collecting keras<2.11,>=2.10.0
  Downloading keras-2.10.0-py2.py3-none-any.whl (1.7 MB)
     ---------------------------------------- 1.7/1.7 MB 27.0 MB/s eta 0:00:00
Collecting h5py>=2.9.0
  Downloading h5py-3.7.0-cp38-cp38-win_amd64.whl (2.6 MB)
     ---------------------------------------- 2.6/2.6 MB 9.9 MB/s eta 0:00:00
Collecting tensorflow-estimator<2.11,>=2.10.0
  Downloading tensorflow_estimator-2.10.0-py2.py3-none-any.whl (438 kB)
     ---------------------------------------- 438.7/438.7 kB 9.1 MB/s eta 0:00:00
Requirement already satisfied: wheel<1.0,>=0.23.0 in d:\anaconda3\envs\tf2\lib\site-packages (from astunparse>=1.6.0->tensorflow) (0.37.1)
Collecting requests<3,>=2.21.0
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting werkzeug>=1.0.1
  Using cached Werkzeug-2.2.2-py3-none-any.whl (232 kB)
Collecting google-auth<3,>=1.6.3
  Downloading google_auth-2.14.0-py2.py3-none-any.whl (175 kB)
     ---------------------------------------- 175.0/175.0 kB 5.2 MB/s eta 0:00:00
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Downloading google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
  Downloading tensorboard_data_server-0.6.1-py3-none-any.whl (2.4 kB)
Collecting markdown>=2.6.8
  Downloading Markdown-3.4.1-py3-none-any.whl (93 kB)
     ---------------------------------------- 93.3/93.3 kB 762.0 kB/s eta 0:00:00
Collecting tensorboard-plugin-wit>=1.6.0
  Downloading tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
     ---------------------------------------- 781.3/781.3 kB 16.4 MB/s eta 0:00:00
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in d:\anaconda3\envs\tf2\lib\site-packages (from packaging->tensorflow) (3.0.9)
Collecting cachetools<6.0,>=2.0.0
  Downloading cachetools-5.2.0-py3-none-any.whl (9.3 kB)
Collecting rsa<5,>=3.1.4
  Downloading rsa-4.9-py3-none-any.whl (34 kB)
Collecting pyasn1-modules>=0.2.1
  Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
     ---------------------------------------- 155.3/155.3 kB 4.7 MB/s eta 0:00:00
Collecting requests-oauthlib>=0.7.0
  Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: importlib-metadata>=4.4 in d:\anaconda3\envs\tf2\lib\site-packages (from markdown>=2.6.8->tensorboard<2.11,>=2.10->tensorflow) (5.0.0)
Requirement already satisfied: idna<4,>=2.5 in d:\anaconda3\envs\tf2\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.11,>=2.10->tensorflow) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in d:\anaconda3\envs\tf2\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.11,>=2.10->tensorflow) (2022.9.24)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Requirement already satisfied: MarkupSafe>=2.1.1 in d:\anaconda3\envs\tf2\lib\site-packages (from werkzeug>=1.0.1->tensorboard<2.11,>=2.10->tensorflow) (2.1.1)
Requirement already satisfied: zipp>=0.5 in d:\anaconda3\envs\tf2\lib\site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<2.11,>=2.10->tensorflow) (3.10.0)
Collecting pyasn1<0.5.0,>=0.4.6
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
     ---------------------------------------- 77.1/77.1 kB 4.5 MB/s eta 0:00:00
Collecting oauthlib>=3.0.0
  Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Installing collected packages: tensorboard-plugin-wit, pyasn1, libclang, keras, flatbuffers, wrapt, werkzeug, urllib3, typing-extensions, termcolor, tensorflow-io-gcs-filesystem, tensorflow-estimator, tensorboard-data-server, rsa, pyasn1-modules, protobuf, opt-einsum, oauthlib, keras-preprocessing, h5py, grpcio, google-pasta, gast, charset-normalizer, cachetools, astunparse, absl-py, requests, markdown, google-auth, requests-oauthlib, google-auth-oauthlib, tensorboard, tensorflow
Successfully installed absl-py-1.3.0 astunparse-1.6.3 cachetools-5.2.0 charset-normalizer-2.1.1 flatbuffers-22.10.26 gast-0.4.0 google-auth-2.14.0 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.50.0 h5py-3.7.0 keras-2.10.0 keras-preprocessing-1.1.2 libclang-14.0.6 markdown-3.4.1 oauthlib-3.2.2 opt-einsum-3.3.0 protobuf-3.19.6 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.28.1 requests-oauthlib-1.3.1 rsa-4.9 tensorboard-2.10.1 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.10.0 tensorflow-estimator-2.10.0 tensorflow-io-gcs-filesystem-0.27.0 termcolor-2.1.0 typing-extensions-4.4.0 urllib3-1.26.12 werkzeug-2.2.2 wrapt-1.14.1

vs code에서 tensorflow 설치 확인

test.ipynb
0.00MB

 

https://toramko.tistory.com/entry/tensorflow-%ED%85%90%EC%84%9C%ED%94%8C%EB%A1%9C%EC%9A%B0-v11x-v22x-%EC%B0%A8%EC%9D%B4-%EB%B0%8F-%EB%B2%84%EC%A0%84-%EC%97%85%EA%B7%B8%EB%A0%88%EC%9D%B4%EB%93%9C

gpu 설정 하는 법 관련 사이트

https://doitgrow.com/28

 

[환경 설정] 텐서플로우(Tensorflow) 2.x GPU 설정 및 사용하는 법 (윈도우10 기준)

게임할 때에는 컴퓨터가 자동으로 그래픽 카드를 인식하여 작동시키지만, 우리가 데이터 분석을 할 때에는 여러가지 설정을 해주어야 합니다. 오늘은 딥러닝의 가장 유명한 프레임워크인 텐서

doitgrow.com

tensorflow 공식 사이트

https://www.tensorflow.org/tutorials/quickstart/beginner

 

텐서플로 2.0 시작하기: 초보자용  |  TensorFlow Core

텐서플로 2.0 시작하기: 초보자용 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요. Note: 이 문서는 텐서플로 커뮤니티에서 번역했습니다. 커뮤니티 번역 활동

www.tensorflow.org

개발환경 동일 구축하기 관련 사이트

https://jh-bk.tistory.com/35

 

[Anaconda] 아나콘다 환경 export, import, clone 하기

Introduction 기존에 사용하고 있던 아나콘다 가상환경을 다른 머신에서도 사용하고 싶다던가, 혹은 기존의 가상환경 위에서 새 패키지를 테스트 해 보고 싶은데 디펜던시가 꼬일 가능성이 커 안전

jh-bk.tistory.com

 

더보기

파일 옮겨두기

728x90
반응형