Closed
Description
CI would sometimes fail because "Could not install packages due to an EnvironmentError: [WinError 145] The directory is not empty" on Windows Python 3.6. Retry could help, but it happens quite frequently.
link to sample error from azure-servicebus CI
...
Successfully built idna-ssl
ERROR: astroid 2.5 has requirement wrapt<1.13,>=1.11, but you'll have wrapt 1.13.3 which is incompatible.
Installing collected packages: urllib3, idna, certifi, charset-normalizer, requests, six, azure-core, pycparser, cffi, cryptography, pywin32, portalocker, PyJWT, msal, msal-extensions, azure-identity, ConfigArgParse, pyyaml, wrapt, multidict, typing-extensions, yarl, vcrpy, azure-devtools, azure-common, azure-mgmt-core, oauthlib, requests-oauthlib, isodate, msrest, azure-mgmt-resource, azure-mgmt-keyvault, webencodings, pyparsing, packaging, bleach, docutils, Pygments, cmarkgfm, readme-renderer, wcwidth, py, attrs, atomicwrites, colorama, zipp, importlib-metadata, more-itertools, pluggy, pytest, pytest-asyncio, json-delta, python-dateutil, azure-storage-common, wheel, coverage, pytest-cov, python-dotenv, azure-mgmt-storage, pyOpenSSL, MarkupSafe, Jinja2, pytoml, azure-sdk-tools, adal, msrestazure, azure-mgmt-servicebus, async-timeout, asynctest, frozenlist, aiosignal, idna-ssl, aiohttp, pip, pytest-custom-exit-code, pytest-forked, execnet, pytest-xdist, smmap, gitdb, GitPython, pbr, stevedore, bandit, chardet, toml, isort, mccabe, typed-ast, lazy-object-proxy, astroid, pylint
Attempting uninstall: wheel
Found existing installation: wheel 0.34.2
Uninstalling wheel-0.34.2:
ERROR: Could not install packages due to an EnvironmentError: [WinError 145] The directory is not empty: 'd:\\a\\_work\\1\\s\\sdk\\servicebus\\azure-servicebus\\.tox\\whl\\lib\\site-packages\\wheel\\'
WARNING: You are using pip version 20.1.1; however, version 21.3.1 is available.
You should consider upgrading via the 'D:\a\_work\1\s\sdk\servicebus\azure-servicebus\.tox\whl\Scripts\python.EXE -m pip install --upgrade pip' command.
=================================== log end ===================================
ERROR: could not install deps [-rdev_requirements.txt, -r../../../eng/test_tools.txt]; v = InvocationError("'D:\\a\\_work\\1\\s\\sdk\\servicebus\\azure-servicebus\\.tox\\whl\\Scripts\\python.EXE'
...
Activity