Access is denied when trying to pip install a package on Windows

前端 未结 8 1310
一生所求
一生所求 2020-12-03 13:41

How to set path for python 3.7.0 ? i tried the every possible way but it still shows the error!!!

Could not install packages due to an EnvironmentError:

8条回答
  •  死守一世寂寞
    2020-12-03 14:22

    I had the same problem.

    After installing Python for all the users, wanted to install Django.

    For that I've gone to the Command Prompt (without using Admin mode) and

    pip.exe install django==2.2
    

    This prompted the following message

    Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\program files\python37\lib\site-packages\pip-19.0.3.dist-info\entry_points.txt' Consider using the --user option or check the permissions.

    The way I've used to solve it was to add --user in the end of the command, just like the prompt message suggests («Consider using the --user»).

    pip.exe install django==2.2 --user
    

    Then everything worked fine.

提交回复
热议问题