无法使用 pip 安装 pandas

新手上路,请多包涵

使用 pip 安装 pandas 时出现错误。有人可以帮我解决这个问题吗?我在 windows10 上使用 python 3.4。

 set build\lib.win-amd64-3.4\pandas/_version.py to '0.22.0'
    running build_ext
    building 'pandas._libs.hashing' extension
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\sthakur1\AppData\Local\Temp\pip-build-2lweg8a9\pandas\setup.py", line 743, in <module>
        **setuptools_kwargs)
      File "C:\Python34\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Python34\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "C:\Python34\lib\distutils\command\install.py", line 539, in run
        self.run_command('build')
      File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Python34\lib\distutils\command\build.py", line 126, in run
        self.run_command(cmd_name)
      File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "C:\Users\sthakur1\AppData\Local\Temp\pip-build-2lweg8a9\pandas\setup.py", line 385, in build_extensions
        build_ext.build_extensions(self)
      File "C:\Users\sthakur1\AppData\Local\Temp\pip-build-2lweg8a9\pandas\setup.py", line 161, in build_extensions
        _build_ext.build_extensions(self)
      File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions
        self.build_extension(ext)
      File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension
        depends=ext.depends)
      File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
        self.initialize()
      File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "C:\Python34\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall
        return unpatched['query_vcvarsall'](version, *args, **kwargs)
      File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
        raise ValueError(str(list(result.keys())))
    ValueError: ['path']

    ----------------------------------------
Command "C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sthakur1\\AppData\\Local\\Temp\\pip-build-2lweg8a9\\pandas\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\sthakur1\AppData\Local\Temp\pip-todgu5lt-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\sthakur1\AppData\Local\Temp\pip-build-2lweg8a9\pandas\

原文由 Sandie 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 955
1 个回答

您是否尝试过以管理员身份运行您的 CMD 窗口?试试这个:

 python -m pip install pandas

还要确保您的 python 安装文件夹在您的“PATH”环境变量中

原文由 Thomas Goodyear 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
logo
Stack Overflow 翻译
子站问答
访问
宣传栏