Python,安装Pytables:ValueError:[u'path']

时间:2016-05-31 15:35:33

标签: python pytables

我在powershell(Windows)中使用命令'pip install tables'来安装Pytables。但我收到了ValueError: [u'path']。 红色写成'Command "python setup.py egg_info" failed with error code 1'。 我安装了miniconda。

编辑:完整的红色错误消息如下:

'Command "python setup.py egg_info" failed with error code 1 in c:\users\evert\appdata\local\temp\pip-build-9wkucl\tables
\'

在我的pip install命令和红色错误消息之间写入以下内容:

Collecting tables
  Using cached tables-3.2.2.tar.gz
    Complete output from command python setup.py egg_info:
    * Using Python 2.7.11 |Continuum Analytics, Inc.| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)]
    * USE_PKGCONFIG: False
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\evert\appdata\local\temp\pip-build-9wkucl\tables\setup.py", line 553, in <module>
        libraries=(package.library_name,))
      File "c:\users\evert\miniconda2\lib\distutils\ccompiler.py", line 758, in has_function
        objects = self.compile([fname], include_dirs=include_dirs)
      File "c:\users\evert\miniconda2\lib\distutils\msvc9compiler.py", line 473, in compile
        self.initialize()
      File "c:\users\evert\miniconda2\lib\distutils\msvc9compiler.py", line 383, in initialize
        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "c:\users\evert\miniconda2\lib\site-packages\setuptools-20.3-py2.7.egg\setuptools\msvc9_support.py", line 52,
 in query_vcvarsall
      File "c:\users\evert\miniconda2\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
        raise ValueError(str(list(result.keys())))
    ValueError: [u'path']

缺少哪一部分?在运行'pip install tables'之前,我应该执行哪些步骤? 谢谢你的帮助。

1 个答案:

答案 0 :(得分:1)

这是一个无法使用vcvarsall.bat正确设置设置所需的某些环境变量的问题。您可以下载pytables here的二进制文件,然后执行pip install tables-3.2.2-*.whl。请务必下载与您的版本和系统架构相匹配的二进制文件。