LoginSignup
9
7

More than 3 years have passed since last update.

pip で「Consider using the `--user` option or check the permissions.」が出た

Posted at

!!今回の記事は解決まで至ってませんが記録として残すものです。!!

PS D:\git\ramchan> pip list
Package    Version
---------- -------
pip        19.0.3
setuptools 40.8.0
You are using pip version 19.0.3, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

pip の最新がある模様ということでpipアップデート。

PS D:\git\myapp> pip install -U pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
      Successfully uninstalled pip-19.0.3
Could not install packages due to an EnvironmentError: [WinError 5] アクセスが拒否されました。: 'C:\\Users\\username\\AppData\\Local\\Temp\\pip-uninstall-sbi5uw51\\pip.exe'
Consider using the `--user` option or check the permissions.

pipをアップデートするだけでアクセス拒否が出た。
--userオプションの利用を検討してみよとのメッセージが出てるのでオプションつけてみた。

PS D:\git\myapp> pip install -U pip --user
Requirement already up-to-date: pip in c:\users\username\appdata\local\programs\python\python37-32\lib\site-packages (19.1.1)
PS D:\git\myapp> pip list
Package    Version
---------- -------
pip        19.1.1
setuptools 40.8.0

すでに最新になっているとのこと。
ちょっと謎だが次回また発生したら試してみよう。

9
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
7