[PYTHON] Use TensorFlow with Intellij IDEA

Described the settings up to handling TensorFlow with Intelij IDEA.

It is assumed that Python 2.7 is included. Install pip virtualenv

$ sudo easy_install pip 
$ sudo pip install --upgrade virtualenv

Create an environment with virtualenv

$ virtualenv --system-site-packages ~/tensorflow
$ cd ~/tensorflow

activate

$ source bin/activate  # If using bash
$ source bin/activate.csh  # If using csh

When activated, the notation changes to the following

(tensorflow)$ 

This time I will install only with MAC CPU version

(tensorflow)$ pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl

Launch python

$ python

If you can execute the following code, tensorflow is running in a hurry.

import tensorflow as tf
hello = tf.constant('HelloWorld')
sess = tf.Session()
print sess.run(hello)

Intellij IDEA settings from here

Select File> New Project> Python Module

Press the "+" button on the Configure SDK screen

Select "Python SDK"

From "select interpreter path", select ~ / tensorflow ... created above.

It will be added as an SDK, so OK and proceed to finish

Create a python file and import tensorflow ~ Write the code for

Select the file you just created from Run> Run

OK if Hello World appears on the console

that's all

Recommended Posts

Use TensorFlow with Intellij IDEA
Use Tensorflow 2.1.0 with Anaconda on Windows 10!
Zundokokiyoshi with TensorFlow
Breakout with Tensorflow
Use mecab-ipadic-neologd with igo-python
Use RTX 3090 with PyTorch
Use ansible with cygwin
[Python] Use JSON with Python
Use Mock with pytest
Use indicator with pd.merge
Use Gentelella with django
Reading data with TensorFlow
Kyotei forecast with TensorFlow
Use mecab with Python3
Use tensorboard with Chainer
Use DynamoDB with Python
Use pip with MSYS2
Use Python 3.8 with Anaconda
Use pyright with Spacemacs
Use python with docker
Use TypeScript with django-compressor
Use LESS with Django
Use MySQL with Django
Try regression with TensorFlow
Use Enums with SQLAlchemy
Use tensorboard with NNabla
Use GPS with Edison
Use nim with Jupyter
Preparing to use Tensorflow (Anaconda) with Visual Studio Code
Translate Getting Started With TensorFlow
Use Trello API with python
Use shared memory with shared libraries
Use "$ in" operator with mongo-go-driver
Use custom tags with PyYAML
Try deep learning with TensorFlow
Use directional graphs with networkx
Use Twitter API with Python
Approximate sin function with TensorFlow
Use pip with Jupyter Notebook
Use DATE_FORMAT with SQLAlchemy filter
Use TUN / TAP with Python
Use sqlite3 with NAO (Pepper)
Use sqlite load_extensions with Pyramid
Use Windows 10 fonts with WSL
Jetson Nano JETPACK 44.1 (2020/10/21) with Tensorflow
Use chainer with Jetson TK1
Use SSL with Celery + Redis
Easy image classification with TensorFlow
Use Cython with Jupyter Notebook
Stock price forecast with tensorflow
Use "% tensorflow_version 2.x" when using TPU with Tensorflow 2.1.0 in Colaboratory
Use Maxout + CNN with Pylearn2
Use WDC-433SU2M2 with Manjaro Linux
Use OpenBLAS with numpy, scipy
Use subsonic API with python3
Use Sonicwall NetExtener with Systemd
Try TensorFlow MNIST with RNN
Use prefetch_related conveniently with Django
Use AWS interpreter with Pycharm
Use Bokeh with IPython Notebook
Use Python-like range with Rust