Programming/Python

[python] pip install error - Consider using the `--user` option or check the permissions.

bisi 2020. 10. 24. 11:28

pip 모듈 설치시 아래와 같은 permissions 에러 현상이 발생하였다. 

 

PS C:\Windows\system32> pip install --upgrade pip
Collecting pip
  Downloading pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 46 kB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 액세스가 거부되었습니다: 'C:\\Users\\Log\\AppData\\Local\\Temp\\pip-uninstall-zx7ak7hc\\pip.exe'
Consider using the `--user` option or check the permissions.

 

처음에는 permission이라고 해서 파워쉘을 관리자 모드로 실행시키면 될까했지만, 에러는 여전히 발생하였다. 

 

해결방법은 pip 설치할때 --user 옵션을 주는것!!

 

해결한 명령어는 아래와 같다. 

PS C:\Windows\system32> python -m pip install --user scikit-image
Collecting scikit-image
  Downloading scikit_image-0.17.2-cp37-cp37m-win_amd64.whl (11.5 MB)
     |████████████████████████████████| 11.5 MB 6.4 MB/s
Requirement already satisfied: numpy>=1.15.1 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from scikit-image) (1.18.5)
Requirement already satisfied: matplotlib!=3.0.0,>=2.0.0 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from scikit-image) (3.3.1)
Collecting imageio>=2.3.0
  Downloading imageio-2.9.0-py3-none-any.whl (3.3 MB)
     |████████████████████████████████| 3.3 MB 6.8 MB/s
Collecting tifffile>=2019.7.26
  Downloading tifffile-2020.10.1-py3-none-any.whl (152 kB)
     |████████████████████████████████| 152 kB 6.4 MB/s
Requirement already satisfied: scipy>=1.0.1 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from scikit-image) (1.4.1)
Collecting PyWavelets>=1.1.1
  Downloading PyWavelets-1.1.1-cp37-cp37m-win_amd64.whl (4.2 MB)
     |████████████████████████████████| 4.2 MB 6.8 MB/s
Requirement already satisfied: pillow!=7.1.0,!=7.1.1,>=4.3.0 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from scikit-image) (7.2.0)
Collecting networkx>=2.0
  Downloading networkx-2.5-py3-none-any.whl (1.6 MB)
     |████████████████████████████████| 1.6 MB 6.4 MB/s
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (1.2.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (2.8.1)
Requirement already satisfied: cycler>=0.10 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (0.10.0)
Requirement already satisfied: certifi>=2020.06.20 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image) (2020.6.20)
Requirement already satisfied: decorator>=4.3.0 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from networkx>=2.0->scikit-image) (4.4.2)
Requirement already satisfied: six>=1.5 in c:\users\log\appdata\local\programs\python\python37\lib\site-packages (from python-dateutil>=2.1->matplotlib!=3.0.0,>=2.0.0->scikit-image) (1.15.0)
Installing collected packages: imageio, tifffile, PyWavelets, networkx, scikit-image
  WARNING: The scripts imageio_download_bin.exe and imageio_remove_bin.exe are installed in 'C:\Users\log\AppData\Roaming\Python\Python37\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts lsm2bin.exe and tifffile.exe are installed in 'C:\Users\log\AppData\Roaming\Python\Python37\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script skivi.exe is installed in 'C:\Users\log\AppData\Roaming\Python\Python37\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed PyWavelets-1.1.1 imageio-2.9.0 networkx-2.5 scikit-image-0.17.2 tifffile-2020.10.1