# Unable to install UIAutomator2 Driver

**URL:** <https://discuss.appium.io/t/unable-to-install-uiautomator2-driver/40579>\
**Category:** Issues/Bugs\
**Created:** [October 18, 2023, 4:49pm UTC](https://discuss.appium.io/t/unable-to-install-uiautomator2-driver/40579 "2023-10-18T16:49:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Appium\_Abhay](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/dfb087/32.png) [@Appium\_Abhay](https://discuss.appium.io/u/Appium_Abhay)\
**Post date:** [October 18, 2023, 4:49pm UTC](https://discuss.appium.io/t/unable-to-install-uiautomator2-driver/40579/1 "2023-10-18T16:49:54Z")

</div>

Hi team,

I am trying to install UIAutomator2 Driver using the command ‘appium driver install uiautomator2’ to setup a mobile automation project using android emulator device but I see the below error. Could anyone please help with this? Thanks in advance!  
Details:  
NPM 10.2.0  
Node V18.18.2  
Appium 2.0.1  
OS: Windows 11

**Error** :  
C:\Users\mohiab01\>appium driver install uiautomator2  
× Installing ‘uiautomator2’ using NPM install spec ‘appium-uiautomator2-driver’  
Error: × Encountered an error when installing package: npm command ‘install --save-dev --omit=peer --save-exact --global-style --no-package-lock appium-uiautomator2-driver --json’ failed with code 1.

STDOUT:  
{  
“error”: {  
“code”: 1,  
“summary”: “command failed”,  
“detail”: “C:\WINDOWS\system32\cmd.exe /d /s /c node install-npm.js\ndbug ChromedriverGoogleapisStorageClient Parsed 776 entries from storage XML\ninfo ChromedriverGoogleapisStorageClient The total count of entries in the mapping: 546\ninfo ChromedriverChromelabsStorageClient The total count of entries in the mapping: 1310\ndbug ChromedriverStorageClient Selecting chromedrivers whose versions match to 118.0.5993.70\ndbug ChromedriverStorageClient Got 5 items\ndbug ChromedriverStorageClient Selecting chromedrivers whose platform matches to win:intel64\ndbug ChromedriverStorageClient Got 1 item\ndbug ChromedriverStorageClient Excluding older patches if present\ndbug ChromedriverStorageClient Versions mapping: {\ndbug ChromedriverStorageClient “118”: [\ndbug ChromedriverStorageClient “118.0.5993.70”\ndbug ChromedriverStorageClient]\ndbug ChromedriverStorageClient }\ndbug ChromedriverStorageClient Got 1 driver to sync: [\ndbug ChromedriverStorageClient “118.0.5993.70/chromedriver-win64.zip”\ndbug ChromedriverStorageClient]\ndbug ChromedriverStorageClient Retrieving ‘[https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/win64/chromedriver-win64.zip](https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/win64/chromedriver-win64.zip)’ to ‘C:\Users\mohiab01\AppData\Local\Temp\2023918-14956-gxkvy3.qcdco\0.zip’\n[11:21:25] Error installing Chromedriver: ENOTEMPTY: directory not empty, rmdir ‘C:\Users\mohiab01\AppData\Local\Temp\2023918-14956-gxkvy3.qcdco’\n[11:21:25] Error: ENOTEMPTY: directory not empty, rmdir ‘C:\Users\mohiab01\AppData\Local\Temp\2023918-14956-gxkvy3.qcdco’\n[11:21:25] Downloading Chromedriver can be skipped by setting the’APPIUM\_SKIP\_CHROMEDRIVER\_INSTALL’ environment variable.”  
}  
}
