python Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。

使用idea编写python项目。需要安装使用的moudle库时,使用pip命令在idea 命令行中出现如下错误:

Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\program files\\windowsapps\\pythonsoftwarefoundation.python.3.7_3.7.1218.0_x64__qbz5n2kfra8p0\\lib\\site-packages\\pip-19.0.3.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

python Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。_第1张图片

主要原因是:安装IDEA时我们安装的python环境包,安装路径在C盘下:

python Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。_第2张图片

这时我们使用命令安装缺少权限,提示建议说使用--user :

使用命令:python -m pip install --user --upgrade pip

python Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。_第3张图片发现已经可以正常安装。

 

你可能感兴趣的:(python)