因为嫌弃官网太慢,然后跑到微软商城装了python(悔不当初)
折腾了半天还是跑去官网重新装了一遍python3.8
python3.8自带pip,但是使用前需要把路径加入变量path
cmd里输入pip,看到help菜单就是可以用了
尝试用命令安装pytest (命令:pip install -U pytest),结果报错了
ERROR: Could not find a version that satisfies the requirement pyparsing>=2.0.2 (from packaging->pytest) (from versions: none)
ERROR: No matching distribution found for pyparsing>=2.0.2 (from packaging->pytest)
输入命令pip install pyparsing,安装pyparsing
这里参考了文章: 解决pip安装matplotlib过程中Could not find a version that satisfies the requirement pyparsing问题
她的环境是Win10,Python3.7,我是win10+python3.8 (是不是3.7之后都会缺少这个呢?只是一个猜测)
再次尝试安装pytest,pip install -U pytest,安装完之后输入命令pytest --version,成功显示版本信息就是真的成功啦~~