[PYTHON] MacBookPro Setup After all I want to do a clean installation

When I buy a new Mac, I want to do a clean install without copying the environment (somehow) Note that I do the same thing every time

0. Settings before setting (key change, etc.)

menu> system preferences > Trackpad

The cursor is light and fast!
* Click: Light
* Tracking Speed: fast
Assign English-kana switching to the Command button
⌘ English: https://ei-kana.appspot.com/
menu> system preferences > Keyboard
The key is light and fast!
* KeyRepeat: Fast
* Delay Until Repeat: short
menu> system preferences > Keyboard > Modifier Keys
Swap Ctrl and Caps Lock

Added to ~ / .bash_profile (changed display of hidden files and Terminal)

defaults write com.apple.finder AppleShowAllFiles -boolean true #Hidden file display
defaults write -g ApplePressAndHoldEnabled -bool false
alias ll='ls -Gla'
alias ls='ls -G'
export LSCOLORS=gxfxcxdxbxegedabagacad

Finder restart killall Finder

1.homebrew http://brew.sh/index_ja.html xcode Command Line Tools is automatically installed

2.anyenv ** Env related items are summarized in anyenv

git clone https://github.com/riywo/anyenv ~/.anyenv
echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(anyenv init -)"' >> ~/.bash_profile
exec $SHELL -l

rbenv, pyenv, ndenv

anyenv install rbenv
anyenv install pyenv
anyenv install ndenv
exec $SHELL -l

ruby

Installable version rbenv install-l
rbenv install 2.3.3
rbenv install 2.3.1 #If necessary
rbenv global 2.3.3
rbenv local 2.3.1 # If necessary
rbenv rehash
rbenv exec gem install bundler -v 1.13.6

node

Installable version ndenv install-l
ndenv install v6.9.4
ndenv global v6.9.4
ndenv rehash

python

python uses anaconda
pyenv install anaconda3-4.2.0

After all I also use python3
pyenv install 3.5.3

pyenv global anaconda3-4.2.0
pyenv rehash

tensorFlow setup

#Set with conda
# Python 3.5
$ conda create -n tensorflow python=3.5
##list of conda environment
conda info -e
# conda environments:
#
tensorflow               /Users/k/.anyenv/envs/pyenv/versions/anaconda3-4.2.0/envs/tensorflow
root                  *  /Users/k/.anyenv/envs/pyenv/versions/anaconda3-4.2.0
#conda environment switching
#Specify with full path because pyenv is used
source  /Users/k/.anyenv/envs/pyenv/versions/anaconda3-4.2.0/envs/tensorflow/bin/activate tensorflow

#Exit the environment
source deactivate

4.mySQL

brew install mysql
mysql.server start
create user 'foo'@'localhost' identified by 'bar-password'

5.emacs

Assign the meta key to option in the terminal settings
terminal > Preferences > keyboard
'Use Option as Meta Key'On
brew install emacs --with-cocoa --srgb
brew linkapps emacs
brew install the_silver_searcher
brew install cask
#Note: evil is used
git clone https://github.com/kanadai/emacs.d.git ~/.emacs.d
cd .emacs.d
cask

6.vim

git clone https://github.com/kanadai/dotfiles.git
ln -s dotfiles/.vimrc .vimrc

mkdir -p ~/.vim/bundle
#Get NeoBundle from repository
$ git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim

Other apps

Sourcetree: https://ja.atlassian.com/software/sourcetree SequelPro: https://sequelpro.com/ vscode: https://code.visualstudio.com/ googleDrive: https://www.google.com/intl/ja_ALL/drive/download/ dropbox: https://www.dropbox.com/ja/ liceCap: http://www.cockos.com/licecap/

mecab


brew install mecab
brew install mecab-ipadic

python web development environment

pyenv-virtualenv
brew install pyenv-virtualenv
python -m venv environment name

source myvirtualenv/foodtasker/bin/activate
pip install django==1.10
pip freeze

django-admin startproject name
python manage.py runserver

...etc.

Recommended Posts

MacBookPro Setup After all I want to do a clean installation
I want to do ○○ with Pandas
I want to do a full text search with elasticsearch + python
I want to print in a comprehension
I want to scrape them all together.
I want to build a Python environment
After all, what should I use to do type comparisons in Python?
I want to do a monkey patch only partially safely in Python
I want to make matplotlib a dark theme
I want to do Dunnett's test in Python
I want to INSERT a DataFrame into MSSQL
I want to create a window in Python
I want to make a game with Python
I don't want to take a coding test
I want to create a plug-in type implementation
I want to do pyenv + pipenv on Windows
I want to easily find a delicious restaurant
I want to write to a file with Python
I want to upload a Django app to heroku
I want to do machine learning even without a server --Time Series Edition -
I want to embed a variable in a Python string
I want to easily implement a timeout in python
I want to iterate a Python generator many times
I want DQN Puniki to hit a home run
100 image processing knocks !! (021-030) I want to take a break ...
I want to give a group_id to a pandas data frame
I want to generate a UUID quickly (memorandum) ~ Python ~
I want to transition with a button in flask
I want to climb a mountain with reinforcement learning
I want to write in Python! (2) Let's write a test
I want to find a popular package on PyPi
I want to randomly sample a file in Python
I want to save a file with "Do not compress images in file" set in OpenPyXL
I want to easily build a model-based development environment
I want to work with a robot in python.
I want to split a character string with hiragana
I want to install a package of Php Redis
[Python] I want to make a nested list a tuple
I want to manually create a legend with matplotlib
[ML Ops] I want to do multi-project with Python
I want to send a business start email automatically
I made a python library to do rolling rank
I decided to do a simple regression analysis manually-1-
I want to run a quantum computer with Python
I want to do something in Python when I finish
I want to do Wake On LAN fully automatically
I want to bind a local variable with lambda
I want to find a stock that will rise 5 minutes after the Nikkei Stock Average rises
I want to do something like sort uniq in Python
I want to make a blog editor with django admin
I want to start a jupyter environment with one command
After all, how much should I write a Qiita article?
I want to start a lot of processes from python
I want to make a click macro with pyautogui (desire)
I want to automatically generate a modern metal band name
[Python beginner] How do I develop and execute Python after all?
NikuGan ~ I want to see a lot of delicious meat! !!
I want to make a click macro with pyautogui (outlook)
I want to use a virtual environment with jupyter notebook!
I want to install a package from requirements.txt with poetry
I want to send a message from Python to LINE Bot