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
.
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
it's simple. Let's install from Anaconda.
conda create -n tensorflow python=3.5
Only this.
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