在Python中加载pptx模块时出现AttributeError

在Python中加载pptx模块时出现AttributeError,python,python-pptx,Python,Python Pptx,在尝试导入python pptx模块时,我得到了重复出现的AttributeError: import pptx AttributeError Traceback (most recent call last) ... ----> 8 import pptx.exc as exceptions ... AttributeError: module 'pptx' has no attribute 'exc' 我正在使用JupyterN

在尝试导入python pptx模块时,我得到了重复出现的
AttributeError

import pptx

AttributeError                            Traceback (most recent call last)
...
----> 8 import pptx.exc as exceptions
...
AttributeError: module 'pptx' has no attribute 'exc'
我正在使用JupyterNotebook,并且已经使用
pip卸载python-pptx
pip安装python-pptx
重新安装了python-pptx。在stackoverflow上,我找到了一个相关的帖子


即使我知道它可能没有加载正确的模块,我也不知道如何进一步解决该问题。非常感谢您的帮助。

您是否有机会将您的程序命名为
pptx.py
?Python将优先加载该模块,而不是库版本

您可以在Python提示符下找到加载了该模块的模块:

>>> import pptx
>>> pptx.__file__
'/somedir/.../python-pptx/pptx/__init__.pyc'

这可能有助于缩小范围。

我已经尝试过,模块加载正确。