LoginSignup
2

More than 5 years have passed since last update.

Python3環境でQiita API v2のPythonラッパーを動かす(Mac OS X 10.11(El Capitan))

Last updated at Posted at 2015-10-17

OS X 10.11 界隈では不穏な噂のあるHomebrewですが、じぶんもしっかり引っかかる。エラーメッセージにみちびかれるまま、

 sudo chown -R $(whoami):admin /usr/local

後に ,brew updatebrew upgradeで無事復帰、さて、Python3.xをインストールする。

genki@iwaboos-MBA:~$ brew install python3
==> Installing dependencies for python3: pkg-config, sqlite, gdbm
==> Installing python3 dependency: pkg-config
:
:
genki@iwaboos-MBA:~$ python3 --version
Python 3.5.0

どうやら、インストール出来たらしい。さて、pipコマンドでラッパーをインストール公式ページではpip install qiita_v2となっているが、Python3.xで使うので、pip3 install qiita_v2でインストール。

genki@iwaboos-MBA:~$ pip3 install qiita_v2
Collecting qiita-v2
Downloading qiita_v2-0.1.0.tar.gz
Collecting pyyaml (from qiita-v2)
Downloading PyYAML-3.11.tar.gz (248kB)
100% |████████████████████████████████| 249kB 1.1MB/s
Collecting requests (from qiita-v2)
Downloading requests-2.8.1-py2.py3-none-any.whl (497kB)
100% |████████████████████████████████| 499kB 1.0MB/s
Building wheels for collected packages: qiita-v2, pyyaml
Running setup.py bdist_wheel for qiita-v2
Stored in directory: /Users/genki/Library/Caches/pip/wheels/3c/86/92/b7f144db7d5fa54acff97a656bcedaa61cba5ad69b8f809df1
Running setup.py bdist_wheel for pyyaml
Stored in directory: /Users/genki/Library/Caches/pip/wheels/fa/db/f6/dee55793d344f1706dc4a5a693298f0115241d1085cc212364
Successfully built qiita-v2 pyyaml
Installing collected packages: pyyaml, requests, qiita-v2
Successfully installed pyyaml-3.11 qiita-v2-0.1.0 requests-2.8.1

これで環境構築は完了。サンプルコードetcで動作確認ができればOK。

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
2