小技巧——去除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
发布评论