前提・実現したいこと
GCEのあるPythonプログラムを実行。実行するコマンドは以下
python
1sudo python3 webhook.py
発生している問題・エラーメッセージ
このようなエラーが表示されており、前に進めません。
どなたか回避方法をご存知でしたら、ご確認願います。
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "webhook.py", line 6, in <module> import core File "/home/shota.k/project/core.py", line 3, in <module> import lib.git as git_func File "/home/shota.k/project/lib/git.py", line 4, in <module> from git import Repo File "/home/shota_k/.local/lib/python3.5/site-packages/git/__init__.py", line 85, in <module> raise ImportError('Failed to initialize: {0}'.format(exc)) ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways: - be included in your $PATH - be set via $GIT_PYTHON_GIT_EXECUTABLE - explicitly set via git.refresh() All git commands will error until this is rectified. This initial warning can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values: - quiet|q|silence|s|none|n|0: for no warning or exception - warn|w|warning|1: for a printed warning
以下コマンドの実行結果を質問文に入れてください。
sudo python3 -m pip freeze
また、webhook.pyの内容も質問文に入れてください。
あなたの回答
tips
プレビュー