Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python package no longer working - ImportError: No module named dominate

I've been using the Python package Dominate for a few months and all of a sudden it does not work:

Traceback (most recent call last):
   File "sitecode.py", line 4, in <module>
     import dominate
ImportError: No module named dominate

I ran this code last week without a problem and had made no updates to the code, Python or any packages since then. Tonight I tried updating Python (2.7), Dominate (2.1.16), and uninstalling and reinstalling Dominate with no luck. I have read a bunch of other "ImportError: No module named ..." posts but none of them mentioned packages that suddenly stopped working. Dominate is still available to be installed so the package is still there. Does anyone have any idea what's going on?

like image 579
gregorio099 Avatar asked Nov 21 '22 02:11

gregorio099


1 Answers

You may need to check few things:

  1. Try to uninstall and install the dominate package:
$ pip uninstall dominate
$ pip install dominate
  1. If you were using python environment, make sure your terminal windows is in that environment:
$ source ~/venv/bin/activate
$ pip uninstall dominate
$ pip install dominate
like image 113
Alle Aldine Avatar answered Nov 23 '22 23:11

Alle Aldine