cannot interface uart wifi with arduino uno

I am trying to interface an Uart wifi esp 8266 with arduino uno to create an access point but the program to create an ap is not getting flashed. I am using arduino IDE v1.8.7.The error shown is as follows



2.6

esptool.py v2.6

Serial port COM9

Connecting…____Traceback (most recent call last):

File “C:\Users\nielit\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2/tools/upload.py”, line 25, in

esptool.main(fakeargs)

File “C:/Users/nielit/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\esptool.py”, line 2653, in main

esp.connect(args.before)

File “C:/Users/nielit/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\esptool.py”, line 468, in connect

raise FatalError(‘Failed to connect to %s: %s’ % (self.CHIP_NAME, last_error))

esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header



help!!!