MacBook
python3
venv

python 3.6.5 を macbook にソースコードからインストール

自分用の作業メモ

environ

  • MacBook (Retina, 12-inch, 2017)
  • macOS 10.13.4

download source code

$ mkdir -p ~/src
$ cd ~/src
$ curl -O https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz

install

$ tar Jxvf Python-3.6.5.tar.xz
$ cd Python-3.6.5
$ ./configure --prefix=/opt/python/python-3.6.5
$ make
$ sudo make altinstall

set venv

$ cd ~/.
$ /opt/python/python-3.6.5/bin/python3.6 -m venv `<vevn_name>`
$ source `<vevn_name>`/bin/activate