首页 > 解决方案 > Anaconda / Jupyter lab:更改目录后出现AttributeError

问题描述

import xlwings as xw
wb = xw.Book()

上面的代码给了我以下错误。

    AttributeError: partially initialized module 'xlwings' has no attribute 'Book' 
(most likely due to a circular import)

起初,我认为这是由于通过更新配置文件更改了启动文件夹。

jupyter-notebook_config.py
...
## The directory to use for notebooks and kernels.
#  Default: ''
#c.NotebookApp.notebook_dir = 'E:\python\jupyterlab'
...

但是当代码没有在默认文件夹(c:\Users***)中运行时,它给了我同样的错误。

请帮我。

标签: jupyter-labworking-directory

解决方案


推荐阅读