gpt4 book ai didi

python - 安装 virtualenvwrapper 时出错

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

我已经尝试了所有方法,但无法安装 virtualenvwrapper。

我已经安装了 python 2.7.6 和 virtualenv。

我正在使用 MacOSX Mavericks。

当我尝试使用 pip install virtualenvwrapper 安装时或sudo pip install virtualenvwrapper出现此错误。

Downloading virtualenvwrapper-4.2.tar.gz (125kB): 125kB downloaded
Running setup.py egg_info for package virtualenvwrapper
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/private/var/folders/hl/n7326xr91ls3z8c3s08_dv4r0000gn/T/pip_build_rafagomes/virtualenvwrapper/setup.py", line 7, in <module>
pbr=True,
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/dist.py", line 239, in __init__
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/dist.py", line 263, in fetch_build_eggs
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 564, in resolve
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 802, in best_match
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 814, in obtain
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/dist.py", line 313, in fetch_build_egg
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 593, in easy_install
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 623, in install_item
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 809, in install_eggs
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 1015, in build_and_install
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 1000, in run_setup
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/sandbox.py", line 50, in run_setup
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/sandbox.py", line 100, in run
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/sandbox.py", line 52, in <lambda>
File "setup.py", line 22, in <module>
File "/var/folders/hl/n7326xr91ls3z8c3s08_dv4r0000gn/T/easy_install-fh8Xd1/pbr-0.5.23/pbr/util.py", line 259, in cfg_to_args
File "/var/folders/hl/n7326xr91ls3z8c3s08_dv4r0000gn/T/easy_install-fh8Xd1/pbr-0.5.23/pbr/util.py", line 480, in wrap_commands
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 772, in get_command_list
klass = self.get_command_class(cmd)
File "build/bdist.macosx-10.9-x86_64/egg/setuptools/dist.py", line 366, in get_command_class
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 815, in get_command_class
__import__ (module_name)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/check.py", line 13, in <module>
from docutils.utils import Reporter
File "/Library/Python/2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
from docutils.io import FileOutput
File "/Library/Python/2.7/site-packages/docutils/io.py", line 18, in <module>
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/Library/Python/2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 511, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 443, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "<string>", line 16, in <module>
File "/private/var/folders/hl/n7326xr91ls3z8c3s08_dv4r0000gn/T/pip_build_rafagomes/virtualenvwrapper/setup.py", line 7, in <module>

pbr=True,

File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup

_setup_distribution = dist = klass(attrs)

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/dist.py", line 239, in __init__

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/dist.py", line 263, in fetch_build_eggs

File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 564, in resolve

File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 802, in best_match

File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 814, in obtain

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/dist.py", line 313, in fetch_build_egg

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 593, in easy_install

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 623, in install_item

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 809, in install_eggs

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 1015, in build_and_install

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/command/easy_install.py", line 1000, in run_setup

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/sandbox.py", line 50, in run_setup

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/sandbox.py", line 100, in run

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/sandbox.py", line 52, in <lambda>

File "setup.py", line 22, in <module>

File "/var/folders/hl/n7326xr91ls3z8c3s08_dv4r0000gn/T/easy_install-fh8Xd1/pbr-0.5.23/pbr/util.py", line 259, in cfg_to_args

File "/var/folders/hl/n7326xr91ls3z8c3s08_dv4r0000gn/T/easy_install-fh8Xd1/pbr-0.5.23/pbr/util.py", line 480, in wrap_commands

File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 772, in get_command_list

klass = self.get_command_class(cmd)

File "build/bdist.macosx-10.9-x86_64/egg/setuptools/dist.py", line 366, in get_command_class

File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 815, in get_command_class

__import__ (module_name)

File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/check.py", line 13, in <module>

from docutils.utils import Reporter

File "/Library/Python/2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>

from docutils.io import FileOutput

File "/Library/Python/2.7/site-packages/docutils/io.py", line 18, in <module>

from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput

File "/Library/Python/2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>

locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]

File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 511, in getdefaultlocale

return _parse_localename(localename)

File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 443, in _parse_localename

raise ValueError, 'unknown locale: %s' % localename

ValueError: unknown locale: UTF-8

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/hl/n7326xr91ls3z8c3s08_dv4r0000gn/T/pip_build_rafagomes/virtualenvwrapper
Storing complete log in /Users/user/.pip/pip.log

有人可以帮助我吗? Google 上没有任何内容

谢谢

最佳答案

看来您需要修复 .bashrc 或 .profile 文件中的“本地”变量。

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

更多信息here .

关于python - 安装 virtualenvwrapper 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21234308/

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