简体   繁体   中英

How to install 'warnings' package in Python?

I've seen Python programs using

import warnings

How to install that package? I tried

pip install --upgrade warnings

and got an error

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

warnings is builtin. No need to install it.

pip install pytest-warnings

Use this command for warnings installation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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