gpt4 book ai didi

python-3.x - 如何在 Mac OS X Big Sur 上安装 Python 3.9 的 pandas 模块?

转载 作者:行者123 更新时间:2023-12-04 08:21:49 35 4
gpt4 key购买 nike

我将 Python 3.9 与 Mac OS X (Big Sur) 一起使用。我想安装 Pandas 。我正在使用 pip,但这失败了
pip 安装 Pandas
导致此错误消息

Collecting pandas
Using cached pandas-1.2.0.tar.gz (5.4 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /Users/davea/Documents/workspace/chicommons/maps/web/venv/bin/python3 /Users/davea/Documents/workspace/chicommons/maps/web/venv/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-r7sphyv3/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"''
cwd: None
Complete output (2009 lines):
Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.8" and platform_system == "AIX"' don't match your environment
Collecting setuptools
Using cached setuptools-51.1.0-py3-none-any.whl (2.0 MB)
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting Cython<3,>=0.29.21
Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
Collecting numpy
Using cached numpy-1.19.4.zip (7.3 MB)
...
build/bdist.macosx-10.9-universal2/wheel/numpy/random/mtrand.cpython-39-darwin.so
build/bdist.macosx-10.9-universal2/wheel/numpy/random/_generator.cpython-39-darwin.so
build/bdist.macosx-10.9-universal2/wheel/numpy/random/_pcg64.cpython-39-darwin.so
build/bdist.macosx-10.9-universal2/wheel/numpy/random/_sfc64.cpython-39-darwin.so
build/bdist.macosx-10.9-universal2/wheel/numpy/random/_mt19937.cpython-39-darwin.so
build/bdist.macosx-10.9-universal2/wheel/numpy/random/_philox.cpython-39-darwin.so
build/bdist.macosx-10.9-universal2/wheel/numpy/random/_bounded_integers.cpython-39-darwin.so
build/bdist.macosx-10.9-universal2/wheel/numpy/random/_common.cpython-39-darwin.soTraceback (most recent call last):
File "/Users/davea/Documents/workspace/chicommons/maps/web/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/Users/davea/Documents/workspace/chicommons/maps/web/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/davea/Documents/workspace/chicommons/maps/web/venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-w99svf08/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 211, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-w99svf08/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 197, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-w99svf08/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup
super(_BuildMetaLegacyBackend,
File "/private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-w99svf08/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 508, in <module>
setup_package()
File "setup.py", line 500, in setup_package
setup(**metadata)
File "/private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-install-bom5tv_9/numpy/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-w99svf08/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-w99svf08/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 328, in run
impl_tag, abi_tag, plat_tag = self.get_tag()
File "/private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-w99svf08/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_11_0_universal2')
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the '/Users/davea/Documents/workspace/chicommons/maps/web/venv/bin/python3 -m pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/davea/Documents/workspace/chicommons/maps/web/venv/bin/python3 /Users/davea/Documents/workspace/chicommons/maps/web/venv/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/hm/_tf9xpw10mb0tffdv32g8lrh0000gn/T/pip-build-env-r7sphyv3/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"'' Check the logs for full command output.
不知道还有什么可以尝试的。

最佳答案

归功于 @KetZoomer .通过运行升级 pip

. venv/bin/activate
venv/bin/python -m pip install --upgrade pip
解决了这个问题。

关于python-3.x - 如何在 Mac OS X Big Sur 上安装 Python 3.9 的 pandas 模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65460689/

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