python下载第三方库/插件Could not install packages due to an EnviromentError:HTTPSCONNECT

这段时间正好在学习pytest的框架,其中有两个插件需要下载,即pytest-html、pytest-ordering,我尝试了网上几种方法都没有下载成功,后来才发现需要先下载插件包,然后才可以使用pip来安装

我栽过的坑:在cmd输入pip install pytest-html 报图片上的错误

python下载第三方库/插件Could not install packages due to an EnviromentError:HTTPSCONNECT

解决方法:

1. 进入pycharm-file-settings

2. 点击Project:XXX

3. 点击Project Interpreter

4. 点击右边“+”号

python下载第三方库/插件Could not install packages due to an EnviromentError:HTTPSCONNECT

5. 如图

python下载第三方库/插件Could not install packages due to an EnviromentError:HTTPSCONNECT

6.install Package

python下载第三方库/插件Could not install packages due to an EnviromentError:HTTPSCONNECT

7.出现successfully就是下载插件成功,下面我们开始安装

python下载第三方库/插件Could not install packages due to an EnviromentError:HTTPSCONNECT

8.打开命令指示符(管理员或者普通用户都可以)

9.输入命令:pip install pytest-ordering

10.安装成功

python下载第三方库/插件Could not install packages due to an EnviromentError:HTTPSCONNECT

在pycharm中成功使用pytest-html插件功能

python下载第三方库/插件Could not install packages due to an EnviromentError:HTTPSCONNECT