python安装warnings库
时间: 2023-11-28 20:46:02 浏览: 255
以下是安装pytest_warnings库的步骤:
1. 下载pytest_warnings库的资源文件pytest_warnings-0.3.1-py2.py3-none-any.whl。
2. 打开命令行工具,进入到pytest_warnings库资源文件所在的目录。
3. 输入以下命令安装pytest_warnings库:
```shell
pip install pytest_warnings-0.3.1-py2.py3-none-any.whl
```
4. 如果安装过程中出现ImportError: cannot import name 'xxx' from partially initialized module 'xxxx'错误,可以尝试先安装pytest_warnings库的依赖库,再次安装pytest_warnings库即可。具体操作如下:
```shell
pip install setuptools
pip install wheel
pip install attrs
pip install pytest
pip install pytest-mock
pip install pytest-cov
pip install pytest-xdist
pip install pytest-forked
pip install pytest-asyncio
pip install pytest-timeout
pip install pytest-randomly
pip install pytest-sugar
pip install pytest-warnings
python setup.py install
```
阅读全文