LoginSignup
1
2

More than 5 years have passed since last update.

pymongoを使ってみた

Last updated at Posted at 2016-01-25

pymongoで検索すると、下記のページがヒット。
https://docs.mongodb.org/ecosystem/drivers/python/
installationをクリック。
指示に従って、python -m pip install pymongo を実行。なんかエラーが出たので、色々調べた結果、下記のページを見てpipをインストール。
https://packaging.python.org/en/latest/install_requirements_linux/#installing-pip-setuptools-wheel-with-linux-package-managers
実際に実行したのは以下。
sudo apt-get install python-pip

再度、python -m pip install pymongo を実行。成功。

次に下記のコマンドを実行。#関係するライブラリをインストールする必要があるみたい。
sudo apt-get install build-essential python-dev

その後、Tutrialに従って、サンプルコードを記述。
http://api.mongodb.org/python/current/tutorial.html?_ga=1.45218724.1893331206.1453483295
こっちも参照。
http://www.atmarkit.co.jp/ait/articles/1507/14/news029_2.html
http://qiita.com/mzmttks/items/052a8de5e943501b5ce7

リモートからのアクセスでエラーになったので、confファイルを書き替えた。デフォルトだとリモートアクセス不可の模様。
http://qiita.com/Chan_moro/items/cbf4e451d0a89f4d7c1a

1
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
1
2