0

ここの指示に従ってください: http://docs.dotcloud.com/0.9/guides/migration/

走ったときsudo pip install -U dotcloud

Downloading/unpacking dotcloud
  Downloading dotcloud-0.9.2.tar.gz
  Running setup.py egg_info for package dotcloud
Downloading/unpacking argparse (from dotcloud)
  Downloading argparse-1.2.1.tar.gz (69Kb): 69Kb downloaded
  Running setup.py egg_info for package argparse
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.orig' found anywhere in distribution
    warning: no previously-included files matching '*.rej' found anywhere in distribution
    no previously-included directories found matching 'doc/_build'
    no previously-included directories found matching 'env24'
    no previously-included directories found matching 'env25'
    no previously-included directories found matching 'env26'
    no previously-included directories found matching 'env27'
Downloading/unpacking requests==0.14.1 (from dotcloud)
  Downloading requests-0.14.1.tar.gz (523Kb): 523Kb downloaded
  Running setup.py egg_info for package requests
    warning: no files found matching 'tests/*.'
Downloading/unpacking colorama (from dotcloud)
  Downloading colorama-0.2.4.tar.gz
  Running setup.py egg_info for package colorama
Installing collected packages: dotcloud, argparse, requests, colorama
  Running setup.py install for dotcloud
    changing mode of build/scripts-2.6/dotcloud from 644 to 755
    changing mode of /usr/local/bin/dotcloud to 755
  Found existing installation: argparse 1.2.1
    Uninstalling argparse:
      Successfully uninstalled argparse
  Running setup.py install for argparse
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.orig' found anywhere in distribution
    warning: no previously-included files matching '*.rej' found anywhere in distribution
    no previously-included directories found matching 'doc/_build'
    no previously-included directories found matching 'env24'
    no previously-included directories found matching 'env25'
    no previously-included directories found matching 'env26'
    no previously-included directories found matching 'env27'
  Found existing installation: requests 0.14.1
    Uninstalling requests:
      Successfully uninstalled requests
  Running setup.py install for requests
    warning: no files found matching 'tests/*.'
  Found existing installation: colorama 0.2.4
    Uninstalling colorama:
      Successfully uninstalled colorama
  Running setup.py install for colorama
Successfully installed dotcloud argparse requests colorama
Cleaning up...

私が走るときdotcloud setup

Traceback (most recent call last):
  File "/usr/local/bin/dotcloud", line 16, in <module>
    cli = CLI(endpoint=url, debug=debug, username=username)
  File "/Library/Python/2.6/site-packages/dotcloud/ui/cli.py", line 42, in __init__
    user_agent=self._build_useragent_string(),
  File "/Library/Python/2.6/site-packages/dotcloud/ui/cli.py", line 72, in     _build_useragent_string
    (langcode, encoding) = locale.getdefaultlocale()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py", line 459, in getdefaultlocale
    return _parse_localename(localename)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/locale.py", line 391, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

どんな助けにも感謝します。

4

2 に答える 2

0

cliがlocale._parse_localnameメソッドにアクセスしており、値UTF-8のロケールが見つからないため、ValueErrorが発生しているようです。

以下に示すこのブログ投稿へのリンクは、〜/ .bash_profile(または一部のシステムでは〜/ .profile)を変更して値をエクスポートすると、発生している問題が解決されることを示しています。ファイルを変更する場合は、念のため、必ず最初にファイルをバックアップしてください。

http://patrick.arminio.info/blog/2012/02/fix-valueerror-unknown-locale-utf8/

于 2012-11-18T15:13:45.277 に答える
0

これは、ロケールの問題か、権限の問題です。

デフォルトのロケールが設定されていないか、必要なときにロケールを正しくロードできない可能性があります。

すべての情報をコピーする代わりに、この質問を見て回答を確認してください。

Python ロケールの奇妙なエラー。ここで正確に何が起こっているのですか?

于 2012-11-18T12:49:09.627 に答える