<Python, pip> pipのアップグレード

seabornが待望の0.6をリリースしたようなので、Winpythonをアップグレードしようかなと、、

まずはローカルのバージョンチェック。

[501:~]>pip freeze | grep seaborn
You are using pip version 6.1.1, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
seaborn==0.5.1

pipも新版がでたらしい、、、ではお勧めにしたがいupgrade pip
が、なにやら、エラー出た。。。

[505:~]>pip install --upgrade pip
You are using pip version 6.1.1, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip
  Downloading pip-7.1.0-py2.py3-none-any.whl (1.1MB)
Installing collected packages: pip
  Found existing installation: pip 6.1.1
    Uninstalling pip-6.1.1:
      Successfully uninstalled pip-6.1.1
  Exception:
  Traceback (most recent call last):
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\lib\shutil.py", line 371, in _rmtree_unsafe
      os.unlink(fullname)
  PermissionError: [WinError 5] アクセスが拒否されました。: 'C:\\msys64\\tmp\\pip-0ezsj4q1-uninstall\\winpython-64bit-3.4.3.3\\python-3.4.3.amd                                                          64\\scripts\\pip.exe'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\basecommand.py", line 246, in main
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\commands\install.py", line 352, in run
      'a link. Pip will not automatically replace '
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\req\req_set.py", line 704, in install
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\req\req_install.py", line 743, in commit_uninstall
      )
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\req\req_uninstall.py", line 153, in commit
      self.save_dir = None
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
      return Retrying(*dargs, **dkw).call(f, *args, **kw)
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\_vendor\retrying.py", line 212, in call
      raise attempt.get()
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\_vendor\retrying.py", line 247, in get
      six.reraise(self.value[0], self.value[1], self.value[2])
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\_vendor\six.py", line 659, in reraise
      raise value
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\_vendor\retrying.py", line 200, in call
      attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\utils\__init__.py", line 67, in rmtree
      def ensure_dir(path):
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\lib\shutil.py", line 478, in rmtree
      return _rmtree_unsafe(path, onerror)
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\lib\shutil.py", line 368, in _rmtree_unsafe
      _rmtree_unsafe(fullname, onerror)
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\lib\shutil.py", line 368, in _rmtree_unsafe
      _rmtree_unsafe(fullname, onerror)
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\lib\shutil.py", line 368, in _rmtree_unsafe
      _rmtree_unsafe(fullname, onerror)
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\lib\shutil.py", line 373, in _rmtree_unsafe
      onerror(os.unlink, fullname, sys.exc_info())
    File "C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages\pip\utils\__init__.py", line 79, in rmtree_errorhandler
      return "%s -m pip" % sys.executable
  PermissionError: [WinError 5] アクセスが拒否されました。: 'C:\\msys64\\tmp\\pip-0ezsj4q1-uninstall\\winpython-64bit-3.4.3.3\\python-3.4.3.amd                                                          64\\scripts\\pip.exe'

こりゃ失敗? と思ったら、でもアップグレードされていた。。。

[510:~]>pip -V
pip 7.1.0 from C:\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\Lib\site-packages (python 3.4)

わからん、、、 でも、まーいいや。。。

helpすると、使い方がでてくる。

[509:~]>pip help

Usage:
  pip <command> [options]

Commands:
  install                     Install packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring
                              environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be
                              used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output.
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form
                              [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup.
  --trusted-host <hostname>   Mark this host as trusted, even though it does
                              not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.