vgalin / html2image

A package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.
MIT License
354 stars 43 forks source link

Unable to import package htm2image #89

Closed Enigmaderockz closed 1 year ago

Enigmaderockz commented 1 year ago

I am writing below code from the given details but still getting error. I am using python 3.7.5 from html2image import Html2Image hti = Html2Image() hti.screenshot(url='https://www.python.org', save_as='python_org.png')

error: Traceback (most recent call last): File "main.py", line 1, in <module> from html2image import Html2Image ModuleNotFoundError: No module named 'html2image'

vgalin commented 1 year ago

Hello, just to be sure, have you properly installed the package using python -m pip install html2image? Supposing you're running your script using the python main.py command, the python -m part can be important, as it ensures you're installing the package for the correct Python version.

Enigmaderockz commented 1 year ago

imported properly