miedaの備忘録

わすれないように

python3の開発環境を準備

はじめに

入れるもの

  1. python3本体
  2. Numpy + Scipy
  3. Qt5 + qtpy

番外処理 : Homebrewを最新に (別の記事にしてリンクする事 for 自分)

brew update

Permission Denied とかでるなら

sudo chown -R $USER /usr/local

を試してみる。
linkできねぇ!って時もこれ。
OSアップグレードとかの時になんか書き変わってんの?
参考:
Homebrew で何かインストールするとき "Permission denied" と言われたときの対処法 - ひよこ3分07秒のはてなブログ

メンテもしておく

brew upgrade

brew の状況も確認しておく

brew doctor

python3 + Numpy + Scipy

Homebrew ならインストールはピアノ弾くよりも簡単

brew install python3
pip3 install numpy
pip3 install scipy

Qt5 + pyqt

GUI開発用。
上の二つの他に、それの仲介をする"sip"のインストールが必要

brew install qt5
brew install sip --with-python3
brew install pyqt5 --with-python3

qt5インストール時に

This formula is keg-only, so it was not symlinked into /usr/local.

Qt 5 conflicts Qt 4 (which is currently much more widely used).

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

LDFLAGS: -L/usr/local/opt/qt5/lib
CPPFLAGS: -I/usr/local/opt/qt5/include

と出る。
要はQt4のが一般的なのでQt5のパスは通さねぇから、使うときは自分でなんとかしろってこと。