LoginSignup
3
2

More than 5 years have passed since last update.

計算・作図環境インストール(Mac編)

Posted at

はじめに

2015年7月に OS X を再インストールした時の記録です.
2015年10月以降は,El Capitan で問題なく動いています.

先般,作図ツールの記事を掲載したので,ツール他のインストール方法もアップしておこうと思い立ちました.


Mac では,OS X のインストールが終わった段階で,少なくとも以下のプログラムは既に入っていました.

  • /usr/bin/gcc (Apple LLVM version 6.1.0, clang-602.0.53)
  • /usr/bin/python (version 2.7.6)
  • /usr/bin/ruby (ruby 2.0.0p481)
  • /usr/bin/perl (perl v5.18.2)
  • /usr/bin/awk (version 20070501)

その後自分で使うプログラム類を Mac 本体にインストール.Xcode はインストールしていない状態でスタート.

Homebrew

xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install caskroom/casc/brew-cask
  • 1行目:Xcode をインストールせずにこれを打ち込むと「command line developer toolsが必要」と言われダイアログが立ち上がるので,これに従いインストール
  • 2行目:Homebrew のサイトからインストール用スクリプトをコピペ
  • 3行目:brew doctor で Your system is ready to brew を確認
  • 4行目:brew cask を使えるようにする

参考サイト

コンパイラ (gcc)

brew install gcc

gfortran 単独は受け付けず gcc をインストールするよう言われます.

ImageMagick, GMT, gnuplot

brew install Caskroom/cask/xquartz    # x11
brew install imagemagick --with-x11   # ImageMagick
brew install homebrew/science/gmt     # GMT5
brew install gnuplot --with-x11       # gnuplot
brew install ghostscript              # Ghostscript 9.16

xquarts は ImageMagick,gnuplot を扱うために,ghostscript は TeX を扱うために忘れずにインストールしておく.

参考サイト

Python3, numpy, scipy, matplotlib

Pythonは,本日(2016年6月27日),3.4.3 から 3.5.1 に入れ替えました.

brew install pyenv

#.bash_profileに以下を追加
export PATH="$HOME/.pyenv/shims:$PATH"

source .bash_profile
#.bash_profile を再読み込みする。その後は機械的に以下を実行。

pyenv install 3.5.1
pyenv global 3.5.1
pip3 install numpy
pip3 install scipy
pip3 install matplotlib
pip3 install Pillow

画像処理ライブラリ Pillow のインストールを忘れないこと!

BasicTeX

こちら(https://www.aruneko.net/archives/1423) に従ってインストール.

brew cask install basictex

sudo tlmgr update --self --all
sudo tlmgr install collection-langjapanese latexmk

cd /usr/local/texlive/2015basic/texmf-dist/scripts/cjk-gs-integrate
sudo perl cjk-gs-integrate.pl --link-texmf
sudo mktexlsr

sudo updmap-sys --setoption kanjiEmbed hiragino-elcapitan-pron

sudo tlmgr install symbol
sudo mktexlsr

以上

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2