Пример #1
0
        private void InstallPip()
        {
            var    argumentBuilder = new StringBuilder();
            string pythonPath      = PythonUtil.GetProgramPath(_version);

            argumentBuilder.Append(pythonPath)
            .Append(TextUtil.SEPARATOR_SPACE)
            .Append(SetupToolsPath)
            .Append(@" & ")
            .Append(pythonPath)
            .Append(TextUtil.SEPARATOR_SPACE)
            .Append(PipPath);

            var pipedProcessRunner = TestPipeSkylineProcessRunner ?? new SkylineProcessRunnerWrapper();

            try
            {
                if (pipedProcessRunner.RunProcess(argumentBuilder.ToString(), false, _writer) != 0)
                {
                    throw new ToolExecutionException(Resources.PythonInstaller_InstallPip_Pip_installation_failed__Error_log_output_in_immediate_window__);
                }
            }
            catch (IOException)
            {
                throw new ToolExecutionException(Resources.PythonInstaller_InstallPip_Unknown_error_installing_pip_);
            }
        }