Python学习小技巧——去除weak warnings

编程入门 行业动态 更新时间:2024-10-06 04:05:41

Python学习<a href=https://www.elefans.com/category/jswz/34/1769317.html style=小技巧——去除weak warnings"/>

Python学习小技巧——去除weak warnings

在pycharm中编写程序,import调用模块时,有的模块下方会出现下划波浪线,提示Package containing module 'PIL' is not listed in the project requirements(或者提示Package containing module 'xxx' is not listed in the project requirements)。如图示:

 

 

或提示Unused import statement 'import matplotlib.pyplot as plt'。如图示:

此时只需在该python项目文件目录下requirements.txt中添加相对于模块即可,如图示:

原来的10 warnings,8 weak warnings,8 typos变为10 warnings,6 weak warnings,8 typos.下划线去除。

 

 如有错误,还请指正,谢谢。

更多推荐

Python学习小技巧——去除weak warnings

本文发布于:2024-02-27 23:42:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1766967.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:小技巧   Python   warnings   weak

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!