首页 > 解决方案 > jupyter notebook 引发 AttributeError

问题描述

我正在使用 jupyter notebook 来测试我的 python 包,但是当我尝试运行我的包时,jupyter 会引发以下问题:

AttributeError: module 'logging' has no attribute 'config'

这里有一个类似的问题:Jupyter Notebook - Attribute Error: 'module' object has no attribute 'F_OK' 但是解决方案(降级 conda 和 python)对我来说并不满意。有人有其他想法吗?现在我只是在我的代码中注释该行并且它可以工作,但它不是很方便......

标签: pythonpython-3.xjupyter-notebook

解决方案


您只需要添加import logging.config它就可以解决您的问题。


推荐阅读