On my system (Ubuntu 16.04.1) any attempt to upgrade Platformio either using
pio upgrade or
pip install -U platformio fails on attempt to remove
requests installed with apt:
$ LANG=C pip install -U platformio Requirement already up-to-date: platformio in /usr/local/lib/python2.7/dist-packages Requirement already up-to-date: pyserial<4,>=3 in /usr/local/lib/python2.7/dist-packages (from platformio) Requirement already up-to-date: semantic-version>=2.5.0 in /usr/local/lib/python2.7/dist-packages (from platformio) Collecting requests<3,>=2.4.0 (from platformio) Using cached requests-2.12.3-py2.py3-none-any.whl Requirement already up-to-date: click<6,>=5 in ./.local/lib/python2.7/site-packages (from platformio) Requirement already up-to-date: colorama in ./.local/lib/python2.7/site-packages (from platformio) Requirement already up-to-date: lockfile<0.13,>=0.9.1 in ./.local/lib/python2.7/site-packages (from platformio) Collecting bottle<0.13 (from platformio) Using cached bottle-0.12.10-py2-none-any.whl Installing collected packages: requests, bottle Found existing installation: requests 2.9.1 Uninstalling requests-2.9.1: Exception: Traceback (most recent call last): File "/home/jazg/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/home/jazg/.local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/home/jazg/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/home/jazg/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/home/jazg/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/home/jazg/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames shutil.move(old, new) File "/usr/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/requests-2.9.1.dist-info/DESCRIPTION.rst'
I can install it in virtualenv but this is quite inconvenient…