[PYTHON] Procedure to install TensorFlow in fish shell environment (Anaconda 4.0.0)

I decided to try TensorFlow, so I installed it first. Generally, it's okay as per the official documentation, but if you're using a fish shell, I'm a little addicted to it, so I'll summarize it.

TL;TR

Currently source activate / deactivate is not available in fish shell. You need to use an additional script for fish.

Link or copy this script to .config/fish/conf.d and conda The command activate / deactivate is now available and can be used like source activate / deactivate.

Installation of Python / Anaconda

Well, since it's a big deal, I will write the procedure including the installation of Python / Anaconda.

Use pyenv for installation. Anaconda is also convenient because it can be installed immediately from pyenv.

pyenv itself is entered with brew

brew install pyenv

Now let's put in Anaconda. For Anaconda, please refer to this article.

Let's use Python 3 series this time. It's okay if you install Anaconda 3.4.0.

pyenv install anaconda3-4.0.0

It will take some time, but it can't be helped because related packages will be included. Let's wait patiently. When you're done, switch from Python on that System.

pyenv global anaconda3-4.0.0

python -V
# Python 3.5.1 :: Anaconda 4.0.0 (x86_64)If it comes out, ok

Install TensorFlow

it's simple. Let's install from Anaconda.

conda create -n tensorflow python=3.5

Only this.

source activate cannot be used

If you finish so far, you should activate the TensorFlow environment by doing source activate tensorflow, but this cannot be used with fish shell.

So, as I wrote in TL; TR, bring ʻactivate.fish from the official Anaconda repository and place it in .config / fish / conf.d`. I'd like it to be included once I've installed Anaconda, but I have to wait for the next version to be released, currently I'll bring the source Looks good.

Once this is done

conda activate tensorflow

You can activate your TensorFlow environment with.

If you can do this, the rest is easy. Follow the official tutorial. If you enter the following command in the activated state, it is ok.

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0rc0-py3-none-any.whl

sudo pip install --upgrade $TF_BINARY_URL

If you want to deactivate

conda deactivate tensorflow

It's ok.

Try it out with the annual MNIST Tutorial (https://www.tensorflow.org/versions/r0.9/tutorials/mnist/beginners/index.html#mnist-for-ml-beginners)!

Recommended Posts

Procedure to install TensorFlow in fish shell environment (Anaconda 4.0.0)
install tensorflow in anaconda + python3.5 environment
How to install the deep learning framework Tensorflow 1.0 in the Anaconda environment of Windows
Install scrapy in python anaconda environment
[TF] How to build Tensorflow in Proxy environment
Anaconda3 environment installation procedure
[For beginners] Install the package in the Anaconda environment (Janome)
How to resolve SSL module errors in Anaconda environment
How to install poetry (error handling) in zsh environment
Use Anaconda in pyenv environment
Install Python environment with Anaconda
Introduced Tensorflow (Win / Anaconda environment)
Pip install in proxy environment
Anaconda3 python environment construction procedure
Double-click ipynb in windows + anaconda environment to open with jupyter-notebook
How to install python using anaconda
Steps to install Ubuntu in VirtualBox
Install tensorflow in Docker (LINUX) (memo)
Various Anaconda settings in Windows 10 environment
Python environment construction (pyenv, anaconda, tensorflow)
How to install TensorFlow on CentOS 7
How to run TensorFlow 1.0 code in 2.0
Shell script to build pyenv environment on ubuntu in one shot
How to install Anaconda with pyenv
Unable to import packages installed in virtual environment with Anaconda on Windows 10
How to install python package in local environment as a general user
What to do if you can't install with pip in babun environment
What to do when the warning "The environment is in consistent ..." appears in the Anaconda environment
Install Django in a pipenv virtual environment
Change Python 64bit environment to 32bit environment with Anaconda
How to access environment variables in Python
Use tensorflow in an environment without root
[5 steps] Apply anaconda virtual environment to VScode
Steps to install Python environment on Ubuntu
How to use Anaconda interpreter in PyCharm
To reference environment variables in Python in Blender
tensorflow does not enter in windows + anaconda.
How to use tensorflow under docker environment
Manage python packages to install in containers
How to add python module to anaconda environment
Install rJava on Linux in R3.6 environment.
Creating a virtual environment in an Anaconda environment
Personal Note Package to install on Anaconda
Introduction to docker Create ubuntu environment in ubuntu
Install CaboCha in a non-Anaconda environment (Win)
[mac] Install R in pyenv + Jupyter-Lab environment
Install the package in an offline environment
Implemented DQN in TensorFlow (I wanted to ...)
Steps to install CentOS 8.1 in Virtual Box
For beginners to build an Anaconda environment. (Memo)
Install python package in personal environment on Ubuntu
How to install pip, numpy in Autodesk MAYA
How to run CNN in 1 system notation in Tensorflow 2
How to get help in an interactive shell
Install the python package in an offline environment
Install Python 3.5.1 + numpy + scipy + α in Windows environment
Install gensim in conda environment (and also install mecab)
Use Python in Anaconda environment with VS Code
[Python] How to install OpenCV on Anaconda [Windows]
Error when trying to install psycopg2 in Python
Procedure from uninstalling pyenv to installing again (anaconda)