繁体   English   中英

如何在 Python 中安装“警告”包?

[英]How to install 'warnings' package in Python?

我见过 Python 程序使用

import warnings

如何安装那个包? 我试过了

pip install --upgrade warnings

并得到一个错误

Collecting warnings
  Could not find a version that satisfies the requirement warnings (from versions: )
No matching distribution found for warnings

warnings是内置的。 不需要安装它。

pip install pytest-warnings

使用此命令进行警告安装

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM