2020년 2월 6일 목요일

Ubuntu 에 python3 설치

sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.7
sudo apt install python3-pip
sudo apt install python3-venv
sudo apt install python3-dev

sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.7
sudo apt install python3-pip
sudo apt install python3-venv
sudo apt install python3-dev



pip3 install --upgrade tensorflow requests


python3

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))


mkdir tensorflow
cd tensorflow
git clone https://github.com/tensorflow/models.git
export PYTHONPATH="$PYTHONPATH:$(pwd)/models"
cd models/official/r1/mnist
python3 mnist.py

pip3 show tensorflow
Name: tensorflow
Version: 1.14.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/xxx/.local/lib/python3.6/site-packages
Requires: astor, protobuf, termcolor, gast, numpy, google-pasta, absl-py, six, tensorflow-estimator, tensorboard, keras-applications, wrapt, wheel, grpcio, keras-preprocessing

cd /home/xxx/.local/lib/python3.6/site-packages/tensorboard


python3 main.py --logdir=/tmp/log_file

ufw allow 6006

http://x.x.x.x:6006

[python] subprocess

proc.py import asyncio from argparse import ArgumentParser from asyncio import sleep async def process_function(user, file_path):     if use...