pycharm创建python项目问题集

1. PyCharm IDE,项目导入xml.dom提示No module named dom’ 无法导入,

报错示例: import xml.dom.minidom # 报错为:"No module named dom"

解决方案:

拷贝python解释器的dom(D:\Program Files\Python38\Lib\xml)文件拷贝到IDE文件目录D:\Program Files\JetBrains\PyCharm 2020.1\plugins\python\helpers\typeshed\stdlib\2and3\xml;

2.运行项目遇到:Enable tracemalloc to get the object allocation traceback,解决方案:

添加以下两行:

import warnings
warnings.simplefilter('ignore',ResourceWarning)

 

posted @ 2022-04-28 11:29  anlcy  阅读(199)  评论(0编辑  收藏  举报