Question

I downloaded html 1.13 package from Python site and as per instructions I doubleclicked on install.bat and installed it. I also added the directory C:\Python26\HTML.py-0.04 to PYTHONPATH. But when I try to import the module with

>>> from html import HTML 

I still get ImportError: No module named html Can someone help me understand what I am doing wrong? Thanks.

Was it helpful?

Solution

Usual installation issues.

Issue

you don't need to add it to PYTHONPATH if it is installed into standard directory site-packages and it would already be in the path.

check out there should be a html.. folder in default search path : lib\site-packages

C:\Python26\lib\site-packages\

If you find the folder then your import should work automatically. If you do not find it, that means it did not install properly. To see your issues, run install.bat from command line and check out the errors.

About PYTHONPATH

It augments the default search path for module files. This is usually when, you do not want to install and simply point to custom directory so that python can import modules from there.

Read

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top