ページ更新: 2011-05-26 (木) (3034日前)

(2011-05-26)

ファイルシステムのイベントを監視するライブラリ。

[編集]

メモ #

[編集]

Python 2.6.6, Windows 7, Visual Studio 2008 #

(2011-05-26)

1. PyYAML-3.09.tar.gz でビルドエラーあり。

C:> pip install watchdog
Downloading/unpacking watchdog
  Downloading watchdog-0.5.4.tar.gz (69Kb): 69Kb downloaded
  Running setup.py egg_info for package watchdog
Downloading/unpacking PyYAML>=3.09 (from watchdog)
  Downloading PyYAML-3.09.tar.gz (238Kb): 238Kb downloaded
  Running setup.py egg_info for package PyYAML
Downloading/unpacking argh>=0.8.1 (from watchdog)
  Downloading argh-0.14.0.tar.gz
  Running setup.py egg_info for package argh
Downloading/unpacking pathtools (from watchdog)
  Downloading pathtools-0.1.1.tar.gz (41Kb): 41Kb downloaded
  Running setup.py egg_info for package pathtools
Downloading/unpacking Brownie>=0.3 (from watchdog)
  Downloading Brownie-0.5.1.tar.gz (74Kb): 74Kb downloaded
  Running setup.py egg_info for package Brownie
    no previously-included directories found matching 'docs\_build'
Downloading/unpacking argparse>=1.1 (from watchdog)
  Downloading argparse-1.2.1.tar.gz (69Kb): 69Kb downloaded
  Running setup.py egg_info for package argparse
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.orig' found anywhere in distribution
    warning: no previously-included files matching '*.rej' found anywhere in distribution
    no previously-included directories found matching 'doc\_build'
    no previously-included directories found matching 'env24'
    no previously-included directories found matching 'env25'
    no previously-included directories found matching 'env26'
    no previously-included directories found matching 'env27'
Installing collected packages: argh, argparse, Brownie, pathtools, PyYAML, watchdog
  Running setup.py install for argh
  Running setup.py install for argparse
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.orig' found anywhere in distribution
    warning: no previously-included files matching '*.rej' found anywhere in distribution
    no previously-included directories found matching 'doc\_build'
    no previously-included directories found matching 'env24'
    no previously-included directories found matching 'env25'
    no previously-included directories found matching 'env26'
    no previously-included directories found matching 'env27'
  Running setup.py install for Brownie
    no previously-included directories found matching 'docs\_build'
  Running setup.py install for pathtools
  Running setup.py install for PyYAML
    checking if libyaml is compilable
   C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo 
   /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python26\include 
   -IC:\Python26\PC /Tcbuild\temp.win32-2.6\Release\check_libyaml.c 
   /Fobuild\temp.win32-2.6\Release\check_libyaml.obj
    check_libyaml.c
    build\temp.win32-2.6\Release\check_libyaml.c(2) : fatal error C1083: include
 ファイルを開けません。'yaml.h': No such file or directory

   libyaml is not found or a compiler error: forcing --without-libyaml
    (if libyaml is installed correctly, you may need to
     specify the option --include-dirs or uncomment and
     modify the parameter include_dirs in setup.cfg)
  Running setup.py install for watchdog
    Installing watchmedo-script.py script to C:\Python26\Scripts
    Installing watchmedo.exe script to C:\Python26\Scripts
    Installing watchmedo.exe.manifest script to C:\Python26\Scripts
Successfully installed argh argparse Brownie pathtools PyYAML watchdog
Cleaning up...

2. PyYAML だけ再インストールしてみる →同じエラー(コンパイルエラー)が発生した:

C:> pip install --upgrade PyYAML
Downloading/unpacking PyYAML
  Downloading PyYAML-3.09.tar.gz (238Kb): 238Kb downloaded
  Running setup.py egg_info for package PyYAML
Installing collected packages: PyYAML
  Found existing installation: PyYAML 3.09
    Uninstalling PyYAML:
      Successfully uninstalled PyYAML
  Running setup.py install for PyYAML
    checking if libyaml is compilable
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG -IC:\Python26\include -IC:\Python26\PC /Tcbuild\temp.w
in32-2.6\Release\check_libyaml.c /Fobuild\temp.win32-2.6\Release\check_libyaml.o
bj
    check_libyaml.c
    build\temp.win32-2.6\Release\check_libyaml.c(2) : fatal error C1083: include
 ファイルを開けません。'yaml.h': No such file or directory

    libyaml is not found or a compiler error: forcing --without-libyaml
    (if libyaml is installed correctly, you may need to
     specify the option --include-dirs or uncomment and
     modify the parameter include_dirs in setup.cfg)
Successfully installed PyYAML
Cleaning up...

3. PyYAML を Windows Installer でインストールしてから、watchdog を pip で再インストールしてみる

pip でインストールしようとした PyYAML を uninstallして:

C:> pip uninstall PyYAML
Uninstalling PyYAML:
  c:\python26\lib\site-packages\pyyaml-3.09-py2.6.egg-info
  c:\python26\lib\site-packages\yaml
Proceed (y/n)? y
  Successfully uninstalled PyYAML

PyYAML-3.09.win32-py2.6.exe をダウンロードして実行する。

で、watchdog を再インストールする ... 失敗:

C:> pip install --upgrade watchdog
Downloading/unpacking watchdog
  Downloading watchdog-0.5.4.tar.gz (69Kb): 69Kb downloaded
  Running setup.py egg_info for package watchdog
Downloading/unpacking PyYAML>=3.09 (from watchdog)
  Downloading PyYAML-3.09.tar.gz (238Kb): 238Kb downloaded
  Running setup.py egg_info for package PyYAML
Downloading/unpacking argh>=0.8.1 (from watchdog)
  Downloading argh-0.14.0.tar.gz
  Running setup.py egg_info for package argh
Downloading/unpacking pathtools (from watchdog)
  Downloading pathtools-0.1.1.tar.gz (41Kb): 41Kb downloaded
  Running setup.py egg_info for package pathtools
Downloading/unpacking Brownie>=0.3 (from watchdog)
  Downloading Brownie-0.5.1.tar.gz (74Kb): 74Kb downloaded
  Running setup.py egg_info for package Brownie
    no previously-included directories found matching 'docs\_build'
Downloading/unpacking argparse>=1.1 (from watchdog)
  Downloading argparse-1.2.1.tar.gz (69Kb): 69Kb downloaded
  Running setup.py egg_info for package argparse
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.orig' found anywhere in distribution
    warning: no previously-included files matching '*.rej' found anywhere in distribution
    no previously-included directories found matching 'doc\_build'
    no previously-included directories found matching 'env24'
    no previously-included directories found matching 'env25'
    no previously-included directories found matching 'env26'
    no previously-included directories found matching 'env27'
Installing collected packages: argh, argparse, Brownie, pathtools, PyYAML, watchdog
  Found existing installation: argh 0.14.0
    Uninstalling argh:
      Successfully uninstalled argh
  Running setup.py install for argh
  Found existing installation: argparse 1.2.1
    Uninstalling argparse:
      Successfully uninstalled argparse
  Running setup.py install for argparse
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.orig' found anywhere in distribution
    warning: no previously-included files matching '*.rej' found anywhere in distribution
    no previously-included directories found matching 'doc\_build'
    no previously-included directories found matching 'env24'
    no previously-included directories found matching 'env25'
    no previously-included directories found matching 'env26'
    no previously-included directories found matching 'env27'
  Found existing installation: Brownie 0.5.1
    Uninstalling Brownie:
      Successfully uninstalled Brownie
  Running setup.py install for Brownie
    no previously-included directories found matching 'docs\_build'
  Found existing installation: pathtools 0.1.1
    Uninstalling pathtools:
      Successfully uninstalled pathtools
  Running setup.py install for pathtools
  Found existing installation: PyYAML 3.09
    Uninstalling PyYAML:
      Successfully uninstalled PyYAML
  Running setup.py install for PyYAML
    checking if libyaml is compilable
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS-
 /DNDEBUG -IC:\Python26\include -IC:\Python26\PC /Tcbuild\temp.win32-2.6\Release\check_libyaml.c
 /Fobuild\temp.win32-2.6\Release\check_libyaml.obj
    check_libyaml.c
    build\temp.win32-2.6\Release\check_libyaml.c(2) : fatal error C1083: include ファイルを開け
ません。'yaml.h': No such file or directory

    libyaml is not found or a compiler error: forcing --without-libyaml
    (if libyaml is installed correctly, you may need to
     specify the option --include-dirs or uncomment and
     modify the parameter include_dirs in setup.cfg)
  Found existing installation: watchdog 0.5.4
    Uninstalling watchdog:
      Successfully uninstalled watchdog
  Running setup.py install for watchdog
    Installing watchmedo-script.py script to C:\Python26\Scripts
    Installing watchmedo.exe script to C:\Python26\Scripts
    Installing watchmedo.exe.manifest script to C:\Python26\Scripts
Successfully installed argh argparse Brownie pathtools PyYAML watchdog
Cleaning up...

じゃあ、これでどうだ?:

C:> pip uninstall watchdog
Uninstalling watchdog:
  c:\python26\lib\site-packages\watchdog
  c:\python26\lib\site-packages\watchdog-0.5.4-py2.6.egg-info
  c:\python26\scripts\watchmedo-script.py
  c:\python26\scripts\watchmedo.exe
  c:\python26\scripts\watchmedo.exe.manifest
Proceed (y/n)? y
  Successfully uninstalled watchdog
 
C:> pip install watchdog
Downloading/unpacking watchdog
  Downloading watchdog-0.5.4.tar.gz (69Kb): 69Kb downloaded
  Running setup.py egg_info for package watchdog
Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.09 in c:\pyt
ackages (from watchdog)
Requirement already satisfied (use --upgrade to upgrade): argh>=0.8.1 in c:\pyth
ckages (from watchdog)
Requirement already satisfied (use --upgrade to upgrade): pathtools in c:\python
ages (from watchdog)
Requirement already satisfied (use --upgrade to upgrade): Brownie>=0.3 in c:\pyt
ackages (from watchdog)
Requirement already satisfied (use --upgrade to upgrade): argparse>=1.1 in c:\py
packages (from watchdog)
Installing collected packages: watchdog
  Running setup.py install for watchdog
    Installing watchmedo-script.py script to C:\Python26\Scripts
    Installing watchmedo.exe script to C:\Python26\Scripts
    Installing watchmedo.exe.manifest script to C:\Python26\Scripts
Successfully installed watchdog
Cleaning up...