7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac環境でPython3のインストール

Posted at

ハマったのでメモ
ほとんどこちらを参考にさせていただきましたm(_ _)m

##環境

  • OSX 10.10.5
  • HomeBrewインストール済み

##手順

brew instal pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv install —list#最新版チェック
pyenv install 3.5.1

「zipimport.ZipImportError: can't decompress data; zlib not available」
となってインストールできなければ以下で解決できたっぽい。(参考

brew rm libpng
brew install libpng --universal
brew install wine --with-gcc

インストールできたら

# バージョン切り替え
pyenv global 3.5.0
pyenv rehash
# 確認
python --version

# pipインストール
easy_install pip
# 確認
pip list
# パッケージ確認
pip freeze
# パッケージ書き出し
pip freeze > pip_packages.txt
# パッケージ読み込み(バージョン省略で最新版をインストール)
pip install -r pip_packages.txt
7
8
1

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
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?