자기개발/Trouble Shooting

[COLAB] OSError: Chrome executable not able to be found on your machine

테크윤 2022. 9. 21. 23:57

최근 이직 후 공부를 다시 시작하며

 

colab 을 통해 취미로 파이썬 코드를 짰다.

 

dataframe을 이미지화 하는 부분에서 에러가 발생하였다.

 

 

해결방법은 간단했다.

 

크롬 드라이버를 인식하지 못해서 였다.

다행히 빠르게 해결해서 다행이었다.

!pip install selenium
!apt-get update # to update ubuntu to correctly run apt install
!apt install chromium-chromedriver

sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver')
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')

!pip install dataframe_image
import dataframe_image as dfi

 

한땀한땀 찾아도 되지만

검색으로 한방에 해결!

 

https://github.com/dexplo/dataframe_image/issues/15