Skip to content

Instantly share code, notes, and snippets.

@osmszk
Created June 22, 2019 22:33
Show Gist options
  • Save osmszk/4eb913f07db44b9f99546ec4e5c707e7 to your computer and use it in GitHub Desktop.
Save osmszk/4eb913f07db44b9f99546ec4e5c707e7 to your computer and use it in GitHub Desktop.
AI(ディープラーニング)プログラミング 開発環境構築
(0)前提
Macのバージョン確認
$ which brew
$ brew list
$ which pyenv
$ which conda
$ which python
$ python --version
$ which pip
brew
https://brew.sh/
(1)pyenvをインストール
$ brew upgrade
$ brew install pyenv
$ pyenv --version
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ pyenv versions
$ pyenv install --list
anaconda3-5.3.1
→pyenv動く
pyenv 利用のまとめ
https://qiita.com/m3y/items/45c7be319e401b24fca8
pyenv
https://github.com/pyenv/pyenv
Homebrew
https://brew.sh/
(2)Anacondaインストール
$ pyenv install --list | grep anaconda
$ pyenv install anaconda3-5.3.1
$ pyenv versions
$ pyenv global anaconda3-5.3.1
$ pyenv local 2.7.10
$ python --version
$ which python
$ which pip
→python 3が動く
anaconda
https://www.anaconda.com/
(3)Virtualenvインストール
$ pip install virtualenv
$ mkdir test_project
$ cd test_project
$ virtualenv my_env
($ virtualenv --python=/usr/bin/python2.7 my_env)
$ source my_env/bin/activate
(my_env) $ pip freeze
(my_env) $ pip install tensorflow==2.0.0-beta1
// (my_env) $ pip install torch torchvision
(my_env) $ deactivate
Virtualenvが動く!
Virtualenv
https://virtualenv.pypa.io/en/latest/
https://pypi.org/project/virtualenv/
jupyter
https://pypi.org/project/jupyter/
tensorflow
https://pypi.org/project/tensorflow/
(4)tensorflow のチュートリアル実行
(my_env) $ jupyter notebook
男は黙ってtensorflow!
tensorflowが動く!
tensorflow overview
https://www.tensorflow.org/overview
Keras
https://keras.io/ja/layers/core/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment