gpt4 book ai didi

python - 无法使用 pip 安装 Pandas

转载 作者:行者123 更新时间:2023-12-02 02:55:42 26 4
gpt4 key购买 nike

安装时 pandas使用pip,我收到错误。有人可以帮我解决这个问题。我在 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\

最佳答案

事实证明,在 python 3.4 上使用 pip 安装 pandas 时,这是一个常见问题。这实际上是 pandas 包开发人员确认的一个已知错误
https://github.com/pandas-dev/pandas/issues/20775

最简单的解决方案应该是:

pip install 'pandas<0.21'

关于python - 无法使用 pip 安装 Pandas,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49554622/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com