Closed kindler-king closed 2 years ago
If you have a module in your working directory named pptx
(like pptx.py), then Python is trying to import Presentation
from there. Local modules get precedence over library modules when Python is locating which module to import.
You'll need to change your module name to something else, like my_pptx.py
or perhaps something more descriptive :)
Thanks a lot for the insight @scanny great work. I missed something so simple while trying out pptx. Thanks for the help.
I have python==3.6.7 installed and after doing pip install python-pptx, I am still getting an error
from pptx import Presentation ImportError: cannot import name 'Presentation' from 'pptx' (d:\pptx\PowerPointless\pptx.py)
when trying to run a script from the documentation. Would appreciate any suggestion to fix the error. Note: I have tried using virtual env too.