블로그

[파이썬] Ubuntu 18.04 텐서플로우 설치

우분투 18.04 에서 파이썬 텐서플로우 tensorflow 설치법입니다.

# apt-get update
# apt-get install python3 python3-dev python-dev
# apt-get install build-essential gcc

일단 기본적으로 컴파일할 수 있는 환경을 만든 후에 텐서플로우 파이썬 패키지를 설치합니다.

# pip install tensorflow

Collecting tensorflow
  Using cached https://files.pythonhosted.org/packages/de/f0/96fb2e0412ae9692dbf400e5b04432885f677ad6241c088ccc5fe7724d69/tensorflow-1.14.0-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: gast>=0.2.0 in ./venv/lib/python3.6/site-packages (from tensorflow)
Collecting wrapt>=1.11.1 (from tensorflow)
Requirement already satisfied: six>=1.10.0 in ./venv/lib/python3.6/site-packages (from tensorflow)
Requirement already satisfied: grpcio>=1.8.6 in ./venv/lib/python3.6/site-packages (from tensorflow)
Collecting google-pasta>=0.1.6 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/a3/de/c648ef6835192e6e2cc03f40b19eeda4382c49b5bafb43d88b931c4c74ac/google_pasta-0.2.0-py3-none-any.whl
Requirement already satisfied: absl-py>=0.7.0 in ./venv/lib/python3.6/site-packages (from tensorflow)
Requirement already satisfied: termcolor>=1.1.0 in ./venv/lib/python3.6/site-packages (from tensorflow)
Requirement already satisfied: wheel>=0.26 in ./venv/lib/python3.6/site-packages (from tensorflow)
Requirement already satisfied: keras-applications>=1.0.6 in ./venv/lib/python3.6/site-packages (from tensorflow)
Collecting keras-preprocessing>=1.0.5 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/28/6a/8c1f62c37212d9fc441a7e26736df51ce6f0e38455816445471f10da4f0a/Keras_Preprocessing-1.1.0-py2.py3-none-any.whl
Requirement already satisfied: protobuf>=3.6.1 in ./venv/lib/python3.6/site-packages (from tensorflow)
Collecting tensorboard<1.15.0,>=1.14.0 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/91/2d/2ed263449a078cd9c8a9ba50ebd50123adf1f8cfbea1492f9084169b89d9/tensorboard-1.14.0-py3-none-any.whl
Requirement already satisfied: numpy<2.0,>=1.14.5 in ./venv/lib/python3.6/site-packages (from tensorflow)
Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 (from tensorflow)
  Using cached https://files.pythonhosted.org/packages/3c/d5/21860a5b11caf0678fbc8319341b0ae21a07156911132e0e71bffed0510d/tensorflow_estimator-1.14.0-py2.py3-none-any.whl
Requirement already satisfied: astor>=0.6.0 in ./venv/lib/python3.6/site-packages (from tensorflow)
Requirement already satisfied: h5py in ./venv/lib/python3.6/site-packages (from keras-applications>=1.0.6->tensorflow)
Requirement already satisfied: setuptools in ./venv/lib/python3.6/site-packages (from protobuf>=3.6.1->tensorflow)      
Requirement already satisfied: markdown>=2.6.8 in ./venv/lib/python3.6/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow)
Requirement already satisfied: werkzeug>=0.11.15 in ./venv/lib/python3.6/site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow)
Installing collected packages: wrapt, google-pasta, keras-preprocessing, tensorboard, tensorflow-estimator, tensorflow
Successfully installed google-pasta-0.2.0 keras-preprocessing-1.1.0 tensorboard-1.14.0 tensorflow-1.14.0 tensorflow-estimator-1.14.0 wrapt-1.12.1