diff --git a/docs/en_US/release_notes_4_22.rst b/docs/en_US/release_notes_4_22.rst index dfbf9210c..4bc34e2c4 100644 --- a/docs/en_US/release_notes_4_22.rst +++ b/docs/en_US/release_notes_4_22.rst @@ -27,4 +27,5 @@ Bug fixes | `Issue #5449 `_ - Fixed an issue while comparing the two identical schemas using the schema diff tool. | `Issue #5466 `_ - Correct ipv4 "all interfaces" address in the container docs, per Frank Limpert. | `Issue #5469 `_ - Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog. -| `Issue #5473 `_ - Fixed post-login redirect location when running in server mode under a non-default root. \ No newline at end of file +| `Issue #5473 `_ - Fixed post-login redirect location when running in server mode under a non-default root. +| `Issue #5480 `_ - Fixed an issue where the background job creation fails if there is only a version-specific python binary available in PATH. \ No newline at end of file diff --git a/web/pgadmin/misc/bgprocess/processes.py b/web/pgadmin/misc/bgprocess/processes.py index 048ce21c1..f2be19f9d 100644 --- a/web/pgadmin/misc/bgprocess/processes.py +++ b/web/pgadmin/misc/bgprocess/processes.py @@ -280,7 +280,9 @@ class BatchProcess(object): # anyway be the redundant value in paths. if not current_app.PGADMIN_RUNTIME: paths.insert(0, os.path.join(u(sys.prefix), u'bin')) - interpreter = which(u'python', paths) + python_binary_name = 'python{0}'.format(sys.version_info[0]) \ + if sys.version_info[0] >= 3 else 'python' + interpreter = which(u(python_binary_name), paths) p = None cmd = [