我尝试安装pytable模块。我使用win7 x32,python 2.7.3(x32),cython 0.16,visual studio 2008(9.0)。在cmd.exe'以管理员身份运行'时写:'python setup.py install --hdf5 =“C:\ Program Files \ HDF Group \ HDF5 \ 1.8.9”'。
但是有未解析的外部符号和构建失败:
* Found numpy 1.6.2 package installed.
* Found numexpr 2.0.1 package installed.
* Found Cython 0.16 package installed.
* Found HDF5 headers at ``C:\Program Files\HDF Group\HDF5\1.8.9\include``, libra
ry at ``C:\Program Files\HDF Group\HDF5\1.8.9\lib``.
* Could not find LZO 2 headers and library; disabling support for it.
* Could not find LZO 1 headers and library; disabling support for it.
* Could not find bzip2 headers and library; disabling support for it.
cythoning tables\linkExtension.pyx to tables\linkExtension.c
running install
running build
running build_py
running build_ext
No module named msvccompiler in numpy.distutils; trying from distutils
building 'tables.utilsExtension' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -DNDEBUG=1 -DWIN32=1 -D_HDF5USEDLL_=1 -Iblosc -IC:\Python27\lib\
site-packages\numpy-1.6.2-py2.7-win32.egg\numpy\core\include -I"C:\Program Files
\HDF Group\HDF5\1.8.9\include" -IC:\Python27\include -IC:\Python27\PC /Tctables\
utilsExtension.c /Fobuild\temp.win32-2.7\Release\tables\utilsExtension.obj -Isrc
-DH5_USE_16_API
Found executable C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe
utilsExtension.c
c:\program files\hdf group\hdf5\1.8.9\include\H5public.h(47) : fatal error C1083
: Не удается открыть файл include: stdint.h: No such file or directory
error: Command "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /n
ologo /Ox /MD /W3 /GS- /DNDEBUG -DNDEBUG=1 -DWIN32=1 -D_HDF5USEDLL_=1 -Iblosc -I
C:\Python27\lib\site-packages\numpy-1.6.2-py2.7-win32.egg\numpy\core\include -I"
C:\Program Files\HDF Group\HDF5\1.8.9\include" -IC:\Python27\include -IC:\Python
27\PC /Tctables\utilsExtension.c /Fobuild\temp.win32-2.7\Release\tables\utilsExt
ension.obj -Isrc -DH5_USE_16_API" failed with exit status 2
答案 0 :(得分:5)
在Windows上从源代码安装带有C扩展的Python包很困难。幸运的是,有人制作这些工具包并将其提供给他们:http://www.lfd.uci.edu/~gohlke/pythonlibs/#pytables
从二进制套件中安装它,你会更开心。
答案 1 :(得分:0)
可能重复:pytables installation failed
看看这个答案: https://stackoverflow.com/a/68740234/11236901
或者只是为您的操作系统安装一个稳定版本:http://www.lfd.uci.edu/~gohlke/pythonlibs/#pytables
并在您的目录中安装文件: