Found solution by adding path of chrome to the chrome options. (using options.binary_location)
import undetected_chromedriver as uc
options = webdriver.ChromeOptions()
options.binary_location = "/usr/bin/google-chrome"
driver = uc.Chrome(options=options)
For above to work, chrome and chromedriver have to have matching versions.