前言
刚开始学习pytest框架,用pip install pytest-html命令安装插件时,一直报这个错
ERROR: Could not find a version that satisfies the requirement pytest-html (from versions: none)ERROR: No matching distribution found for pytest-html
一、操作步骤
1.用win+R这个快捷键,在弹窗输入cmd后回车
2.在命令行输入pip install pytest-html,后回车
报错如上图所示,很苦恼!
二、解决方案
进入系统的网络与Internet->代理页面,将各项设置为下图这样:
备注:我的系统的Windows11
然后,再次在命令行输入pip install pytest-html,后回车就好了
总结:在学习过程中感觉遇到很多跟代理设置影响有关的问题,出现问题可以首先去看下这个地方的设置有没有被更改。可能是因为我这边在测试的时候会打开代理的原因,所以!!!
(此文仅供参考,记录自己在学习过程中解决的每一个问题)