I'm trying to open up a PDF as an image using Wand. If I run the code below in Jupyter Notebook, it works fine. If I run the code as a script from Command Prompt, I get an error message. For some reason, the module won't load when it's run outside of Jupyter Notebook. Does anyone have any suggestions?
Windows
Python 3.7.2 (64 bit)
from wand.image import Image
with Image(filename="C:/test.pdf", resolution=300) as img:
print(type(img))
This is the error message:
Traceback (most recent call last):
File "C:\Untitled.py", line 7, in
from wand.image import Image
File "C:\Users\spencer.rand\AppData\Local\Programs\Python\Python37\lib\site-packages\wand\image.py", line 18, in
from . import compat
File "C:\Users\spencer.rand\AppData\Local\Programs\Python\Python37\lib\site-packages\wand\compat.py", line 25, in
abc = collections.abc if PY3 else collections
File "C:\Users\spencer.rand\AppData\Local\Programs\Python\Python37\lib\collections\__init__.py", line 55, in __getattr__
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
AttributeError: module 'collections' has no attribute 'abc'
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)