Я пытаюсь получить прогноз на основе локальной модели с помощью инструмента командной строки gcloud ai-platform, однако получаю сообщение об ошибке "ОШИБКА: (gcloud.ai-platform.local.predict) Что-то пошло не так, мы не можем найти действующий исполняемый файл Python в вашем PATH "
Команда
gcloud ai-platform local predict --model-dir={MODEL_PATH} --json-instances={JSON IMAGE} --verbosity debug
дает ошибку
DEBUG: Running [gcloud.ai-platform.local.predict] with arguments: [--json-instances: "C:\Users\umara\Desktop\DLOCTseg\Normal Image.json", --model-dir: "C:\Users\umara\Desktop\DLOCTseg\export\v1", --verbosity: "debug"]
DEBUG: (gcloud.ai-platform.local.predict) Something has gone really wrong; we can't find a valid Python executable on your PATH.
Traceback (most recent call last):
File "C:\Users\umara\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 985, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "C:\Users\umara\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 795, in Run
resources = command_instance.Run(args)
File "C:\Users\umara\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\surface\ai_platform\local\predict.py", line 79, in Run
signature_name=args.signature_name)
File "C:\Users\umara\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\ml_engine\local_utils.py", line 86, in RunPredict
'Something has gone really wrong; we can\'t find a valid Python '
googlecloudsdk.command_lib.ml_engine.local_utils.LocalPredictEnvironmentError: Something has gone really wrong; we can't find a valid Python executable on your PATH.
ERROR: (gcloud.ai-platform.local.predict) Something has gone really wrong; we can't find a valid Python executable on your PATH.
Однако переменная среды PATH содержит допустимый питон. (Я пробовал две вещи. Запустите команду, используя мою систему python версии 3.6, или запустите команду внутри виртуальной среды anaconda, содержащей python 2.7, и оба выдают одну и ту же ошибку)
echo %PATH%
дает:
C:\Users\umara\AppData\Local\conda\conda\envs\tf-serving;C:\Users\umara\AppData\Local\conda\conda\envs\tf-serving\Library\mingw-w64\bin;C:\Users\umara\AppData\Local\conda\conda\envs\tf-serving\Library\usr\bin;C:\Users\umara\AppData\Local\conda\conda\envs\tf-serving\Library\bin;C:\Users\umara\AppData\Local\conda\conda\envs\tf-serving\Scripts;C:\Users\umara\AppData\Local\conda\conda\envs\tf-serving\bin;C:\Users\umara\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Google\Chrome\Application;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Library\mingw-w64\bin;C:\ProgramData\Anaconda3\Library\usr\bin;C:\ProgramData\Anaconda3\Library\bin;C:\ProgramData\Anaconda3\Scripts;C:\Program Files\Python36\Scripts\;C:\Program Files\Python36\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\bin;C:\Program Files\MATLAB\R2018a\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v714\runtime\win32;C:\Program Files\Git\cmd;C:\Program Files\PostgreSQL\10\bin;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Users\umara\Downloads\ffmpeg-20190114-d52a1be-win64-static\ffmpeg-20190114-d52a1be-win64-static\bin;;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Library\mingw-w64\bin;C:\ProgramData\Anaconda3\Library\usr\bin;C:\ProgramData\Anaconda3\Library\bin;C:\ProgramData\Anaconda3\Scripts;C:\Program Files\Python36\Scripts\;C:\Program Files\Python36\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\libnvvp;C:\Program Files\NVIDIA ;
и echo %CLOUDSDK_PYTHON%
урожайность
C:\Program Files\Python36\python.exe
Я также попытался удалить и переустановить облачный SDK, но это не устранило проблему. Может ли кто-нибудь объяснить мне, в чем может быть проблема. Спасибо