8

このエラーのバリエーションを見てきましたが、解決策はありません。

デスクトップフォルダー、Lubuntu 18.04 に depot_tools をインストールします。

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

(明らかに)完全に問題なく解決します。PATH の mod は問題ありません。いや~、絶対パスです。

$python -V = 2.7.17

/usr/lib には、python3、python3.6、python 3.7、および python 3.8 も含まれています。

gclient sync または fetch を呼び出すと、次のように返されます。

/home/arctos/Desktop/stream/depot_tools/bootstrap_python3: line 32: bootstrap-3.8.0.chromium.8_bin/python3/bin/python3: No such file or directory
/home/arctos/Desktop/stream/depot_tools/bootstrap_python3: line 32: bootstrap-3.8.0.chromium.8_bin/python3/bin/python3: No such file or directory
cat: /home/arctos/Desktop/stream/depot_tools/python3_bin_reldir.txt: No such file or directory
/home/arctos/Desktop/stream/depot_tools/vpython3: line 52: /home/arctos/Desktop/stream/depot_tools/.cipd_bin/vpython3: No such file or directory

bootstrap_python3 を調べると、次のようになります。

  BOOTSTRAP_PATH="bootstrap-${PYTHON3_VERSION}_bin"

  # Install CIPD packages. The CIPD client self-bootstraps.
  "cipd" ensure -log-level warning -ensure-file "${CIPD_MANIFEST}" \
      -root "$BOOTSTRAP_PATH"

  BOOTSTRAP_PYTHON_BIN="${BOOTSTRAP_PATH}/python3/bin/python3"
  "$BOOTSTRAP_PYTHON_BIN" "bootstrap/bootstrap.py" --bootstrap-name "$BOOTSTRAP_PATH"

そのため、{PYTHON3_VERSION} を含む BOOTSTRAP_PATH を設定しようとしている場所で競合が発生しているようです。GCLIENT.PY が含まれています

# Warn when executing this script with Python 3 when the GCLIENT_PY3 environment
# variable is not set to 1.
# It is an increasingly common error on Windows 10 due to the store version of
# Python.
if (sys.version_info.major >= 3
    and not 'GCLIENT_TEST' in os.environ
    and os.getenv('GCLIENT_PY3') != '1'):
  print('Warning: Running gclient on Python 3. \n'
        'If you encounter any issues, please file a bug on crbug.com under '
        'the Infra>SDK component.', file=sys.stderr)

現在、sys.version_info.major は Python 3 ではなく Python 2.7.17 を示しています。

class GClientSmokeBase(fake_repos.FakeReposTestBase):
  def setUp(self):
    super(GClientSmokeBase, self).setUp()
    # Make sure it doesn't try to auto update when testing!
    self.env = os.environ.copy()
    self.env['DEPOT_TOOLS_UPDATE'] = '0'
    self.env['DEPOT_TOOLS_METRICS'] = '0'
    # Suppress Python 3 warnings and other test undesirables.
    self.env['GCLIENT_TEST'] = '1'
    self.env['GCLIENT_PY3'] = '0' if sys.version_info.major == 2 else '1'
    self.maxDiff = None

しかし、depot_tools を正しくインストール/実行できるようにする適切な修正方法を特定できません。

また、これが新しいエラーであることは何の価値もありません。2週間前のインストールは問題ありませんでした。

4

0 に答える 0