如何在Python中安装'warnings'包?

时间:2017-12-08 21:23:51

标签: python package

我见过使用

的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

2 个答案:

答案 0 :(得分:3)

warnings已内置。无需安装。

答案 1 :(得分:0)

pip install pytest-warnings

使用此命令进行警告安装