<Python, peewee, Windows, Visual Studio> peewee を入れた。
オブジェクト リレイション マッパー ORM (Object Relation Mapper)
の、
peewee
がSQL Alchemy
と比べて操作簡単そうなので、入れてみた。
が、いろいろメンドクサカッタので、メモ。
その1)
pip
でインストールをしてみた。
が、エラー。```
% pip install peewee Collecting peewee Using cached peewee-2.8.5.tar.gz Building wheels for collected packages: peewee : error: Unable to find vcvarsall.bat :
vcvarsall.bat
がないと怒られる。
その2)
いろいろグーグルした結果、python
をコンパイルしたC++
のバージョンを確認する。
In [1]: from distutils.msvc9compiler import * In [2]: get_build_version() Out[2]: 14.0 In [3]: find_vcvarsall(14.0)
C++は、Version 14.0 だが、どうもpython
さんがvcvarsall
を見つけれていないらしい。
その3)
いろいろグーグルした結果、Visual Studio
をインストールする。
ダウンロード先。今は、Visual Studio Community
というのが、無料であるらしい。
その4)
その後、ただ、インストールしただけではだめなこと発覚。
インストール時にProgramming Languages -> Visal C++ -> Common Tools for Visual C++ 2015
を選択する必要あり。
で、選ぶ+インストール。
参考先。
その5)
で、チェック。
In [12]: find_vcvarsall(14.0) Out[12]: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat'
おおー。出たー。
ちなみに、下記探したら確かにvcvarsall.bat
があった。
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
その6)
はれてpeewee
をインストール。
% pip install peewee Collecting peewee Using cached peewee-2.8.5.tar.gz Building wheels for collected packages: peewee Running setup.py bdist_wheel for peewee: started Running setup.py bdist_wheel for peewee: finished with status 'done' Stored in directory: C:\Users\Nekoyuki\AppData\Local\pip\Cache\wheels\01\37\92\e58e351fd9934c1167e2b47229ffe6f2dac238a3c3e76aa198 Successfully built peewee Installing collected packages: peewee Successfully installed peewee-2.8.5
成功。よかったー。
参考にさせてもらったところ。