diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index dbfbee86..c4c9011e 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -32,6 +32,11 @@ def cli(): for cmd in cmds: r = None r = util.exec_command(cmd) + + # try pip with disabled cache + if r['returncode'] != 0 and cmd[0] == "pip": + r = util.exec_command(["pip", "--no-cache-dir"] + cmd[1:]) + assert r['returncode'] == 0 assert last in r['out'].strip() click.secho( diff --git a/scripts/get-platformio.py b/scripts/get-platformio.py index 1fad5117..bcab3d14 100644 --- a/scripts/get-platformio.py +++ b/scripts/get-platformio.py @@ -97,7 +97,7 @@ def main(): ("Fixing Windows %PATH% Environment", fix_winpython_pathenv, []), ("Installing Python Package Manager", install_pip, []), ("Installing PlatformIO and dependencies", install_pypi_packages, - [["setuptools", "virtualenv", "platformio"]]) + [["setuptools", "platformio"]]) ] if not IS_WINDOWS: