gpt4 book ai didi

python - 即使手动安装所有依赖项后,也无法使用 pip 安装 Seaborn

转载 作者:行者123 更新时间:2023-12-01 04:04:52 26 4
gpt4 key购买 nike

$ pip install seaborn

Collecting seaborn
Using cached seaborn-0.7.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/hf/hf0xmv_d6mb0n4qp6xqkq0sh0000gn/T/pip-build-UpeZ8b/seaborn/setup.py", line 66, in <module>
install_requires = check_dependencies()
File "/private/var/folders/hf/hf0xmv_d6mb0n4qp6xqkq0sh0000gn/T/pip-build-UpeZ8b/seaborn/setup.py", line 54, in check_dependencies
import matplotlib
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1131, in <module>
rcParams = rc_params()
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 975, in rc_params
return rc_params_from_file(fname, fail_on_error)
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1100, in rc_params_from_file
config_from_file = _rc_params_in_file(fname, fail_on_error)
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1018, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/local/lib/python2.7/site-packages/matplotlib/__init__.py", line 1000, in _open_file_or_url
encoding = locale.getdefaultlocale()[1]
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/hf/hf0xmv_d6mb0n4qp6xqkq0sh0000gn/T/pip-build-UpeZ8b/seaborn

我已经安装了 Seaborn 的所有必要依赖项(matplotlib、scipy、numpy、pandas、statsmodels;但没有任何用处。我做错了什么?

最佳答案

您可以尝试发布的解决方案 here

在你的~/.bash_profile中:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

关于python - 即使手动安装所有依赖项后,也无法使用 pip 安装 Seaborn,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35801364/

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